Skip to content

Instantly share code, notes, and snippets.

@johnivanoff
Created October 8, 2015 16:46
Show Gist options
  • Save johnivanoff/0dbf7c825c5656cec7d3 to your computer and use it in GitHub Desktop.
Save johnivanoff/0dbf7c825c5656cec7d3 to your computer and use it in GitHub Desktop.
def hello(attrs)
@vin = attrs[:vin]
@vin_is_fake = attrs[:vin_is_fake]
if @vin_is_fake
puts 'true'
else
puts 'false'
end
end
hello(:vin => '555555') # => false
hello(:vin => '555555', :vin_is_fake => true) # => true
hello(:vin => '555555', :vin_is_fake => 'false') # => true
hello(:vin => '555555', :vin_is_fake => false) # => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment