This website collects cookies to deliver better user experience
class MyClass def my_method ENV['important_var'] + 1 end
class MyClass VAR = ENV.fetch('important_var') def my_method VAR + 1 end
class MyClass ENV['important_var'] ||= 'hello' if Rails.env.development? ENV['important_var'] ||= 'world' if Rails.env.test?
# config/environments/development.rb ENV['important_var'] ||= 'hello' # config/environments/test.rb ENV['important_var'] ||= 'world'
my_flag = ENV['MY_FLAG'] == 't' || ENV['MY_FLAG'] == 'true'
my_flag = ENV['MY_FLAG'].present?
33
0