Created
June 12, 2018 08:41
-
-
Save chooyan-eng/eb85d464e67bf0e5277b7521784da5d8 to your computer and use it in GitHub Desktop.
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 Child | |
# おつかいに行くためには、商品とお店の情報が必要 | |
def go_shopping(item, shop) | |
walk_to(shop) # お店に行く | |
buy(item) # 商品を買う | |
come_back(@home) # 家に帰ってくる | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment