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