Class: Setsumei::Describable::ObjectAttribute
- Defined in:
- lib/setsumei/describable/object_attribute.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Attributes inherited from Attribute
#lookup_key, #name, #options, #type
Instance Method Summary collapse
- #==(other) ⇒ Object
- #cast(data) ⇒ Object
-
#initialize(type = nil) ⇒ ObjectAttribute
constructor
A new instance of ObjectAttribute.
Methods inherited from Attribute
#is_an_attribute_of_type?, #set_value_on, #value_for
Constructor Details
#initialize(type = nil) ⇒ ObjectAttribute
Returns a new instance of ObjectAttribute.
5 6 7 |
# File 'lib/setsumei/describable/object_attribute.rb', line 5 def initialize type = nil @klass = type || Object end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
8 9 10 |
# File 'lib/setsumei/describable/object_attribute.rb', line 8 def klass @klass end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 |
# File 'lib/setsumei/describable/object_attribute.rb', line 10 def == other :object == other || ObjectAttribute == other || klass == other end |