Skip to content

Instantly share code, notes, and snippets.

@robertodecurnex
Created September 19, 2014 19:16
Show Gist options
  • Save robertodecurnex/d34b8cd1b94902c535b6 to your computer and use it in GitHub Desktop.
Save robertodecurnex/d34b8cd1b94902c535b6 to your computer and use it in GitHub Desktop.
CS Example
class Say
def hello to='Minion'
#sc say_hello(to)
end
end
puts Say.new.hello
__END__
sc say_hello String: String
"Minion" -> "Say Hello to Minion"
"RamiroR" -> "Say Hello to RamiroR"
class Say
def hello to='Minion'
def say_hello(string)
lambda {|string| "Say Hello to #{string}" }.call(string)
end
#sc say_hello(to)
say_hello(to)
end
end
puts Say.new.hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment