Skip to content

Instantly share code, notes, and snippets.

@ecuageo
Created May 14, 2015 15:15
Show Gist options
  • Save ecuageo/174e161728032a194e16 to your computer and use it in GitHub Desktop.
Save ecuageo/174e161728032a194e16 to your computer and use it in GitHub Desktop.
use builtin conversion protocols 2
class HeartSaver
def initialize(you)
@you = you
end
def perform_heart_surgery_from_form_input(form_input)
cut_this_much_away_from_main_artery(form_input.to_i)
end
private
def cut_this_much_away_from_main_artery(crucial_integer)
puts "everything should go well"
end
end
hs = HeartSaver.new('George South')
hs.perform_heart_surgery_from_form_input('yes please')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment