Class: Croesus::Attribute
Overview
A single attribute that is attached to a model
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #default ⇒ Object
-
#initialize(type = String, options = {}) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
23 24 25 |
# File 'lib/croesus/attribute.rb', line 23 def type @type end |
Instance Method Details
#default ⇒ Object
37 38 39 |
# File 'lib/croesus/attribute.rb', line 37 def default @default.call end |