Class: BCDD::Value::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdd/ext/value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



8
9
10
# File 'lib/bcdd/ext/value.rb', line 8

def errors
  @errors
end

#valueObject (readonly)

Returns the value of attribute value.



8
9
10
# File 'lib/bcdd/ext/value.rb', line 8

def value
  @value
end