class Bean def initialize(cool) @cool = cool end def is_cool return @cool end def be_cool=(cool) @cool = cool end end def we_cool(beans) for bean in beans if not bean.is_cool() puts "Not cool." bean.be_cool = true end end puts "We cool." end beans = [Bean.new(true), Bean.new(false)] we_cool beans
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15129 | zachwhaley | Add practice directory |