Created
September 19, 2014 19:16
-
-
Save robertodecurnex/d34b8cd1b94902c535b6 to your computer and use it in GitHub Desktop.
CS Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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