Skip to content

Instantly share code, notes, and snippets.

@luisfmcalado
Created August 4, 2017 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisfmcalado/c40ceb0ca998c55576984120daa93bce to your computer and use it in GitHub Desktop.
Save luisfmcalado/c40ceb0ca998c55576984120daa93bce to your computer and use it in GitHub Desktop.
class Person
private
SPEAK = ENV['ENABLE_SPEAK'] == 'true'
public
def speak
return 'WWWWWAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHH' unless SPEAK
"Luke, I am Your Father"
end
def speak_2
return 'WWWWWAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHH' unless ENV['ENABLE_SPEAK'] == 'true'
"Luke, I am Your Father"
end
end
person = Person.new
puts person.speak
puts person.speak_2
ENV['ENABLE_SPEAK'] = 'true'
person = Person.new
puts person.speak
puts person.speak_2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment