[Nitro] [FEATURE] alias method for boolean attributes

Antoniolo antoniolo at gmail.com
Wed Mar 14 19:54:25 EDT 2007


It's just a silly feature ... but worthwhile.

class BankAccount
  attr_accessor :blocked, TrueClass
end

acc = BankAccount[1]
acc.blocked # => true
acc.blocked? # => true
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alias_method_for_boolean_attributes.feature.tar.gz
Type: application/octet-stream
Size: 9338 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070314/7ce95049/attachment.obj 


More information about the Nitro-general mailing list