# # basic usage is like attr, but note that attribute defines three methods, # getter, setter, and query # require 'attributes' class C attribute 'a' end c = C.new c.a = 42 # setter p c.a # getter p 'forty-two' if c.a? # query