Last active
August 29, 2015 14:07
-
-
Save krainboltgreene/1d00227eb6319b1d83c0 to your computer and use it in GitHub Desktop.
An example of dragon method calls
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
Person: Thing clone | |
setup: method | |
prefix: "The Infamous" | |
moniker: method | |
"{{prefix}} {{name}}, age {{age}}" | |
actor: Person create | |
name: "Kurtis Rainbolt-Greene" | |
age: 27 | |
actor moniker | |
# => "The Infamous Kurtis Rainbolt-Greene, age 27" | |
actor moniker(prefix: "Sir") | |
# => "Sir Kurtis Rainbolt-Greene, age 27" | |
actor moniker | |
prefix: "Frumpy" | |
# => "Frumpy Kurtis Rainbolt-Greene, age 27" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment