Class: BCDD::Value::Object
- Inherits:
-
Object
- Object
- BCDD::Value::Object
- Defined in:
- lib/bcdd/ext/value.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ Object
constructor
A new instance of Object.
Constructor Details
#initialize(value = nil) ⇒ Object
Returns a new instance of Object.
10 11 12 13 14 15 16 |
# File 'lib/bcdd/ext/value.rb', line 10 def initialize(value = nil) properties = self.class::Properties contract = properties.map(value) @errors = contract.errors @value = contract.value end |