Method: Cylons::Attributes#read_attribute
- Defined in:
- lib/cylons/attributes.rb
#read_attribute(name) ⇒ Object Also known as: []
3 4 5 6 7 8 9 10 11 |
# File 'lib/cylons/attributes.rb', line 3 def read_attribute(name) name = name.to_s if @attributes.has_key?(name) || self.respond_to?(name) @attributes[name] else raise ::ActiveAttr::UnknownAttributeError, "unknown attribute: #{name}" end end |