Skip to content

Instantly share code, notes, and snippets.

@chooyan-eng

chooyan-eng/child.rb

Created Jun 12, 2018
Embed
What would you like to do?
# 「子供」を表現するコード
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
You can’t perform that action at this time.