Class: Estratto::Data::Base
- Inherits:
-
Object
- Object
- Estratto::Data::Base
- Defined in:
- lib/estratto/data/base.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#formats ⇒ Object
readonly
Returns the value of attribute formats.
Instance Method Summary collapse
- #coerce ⇒ Object
-
#initialize(data, formats = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(data, formats = {}) ⇒ Base
Returns a new instance of Base.
8 9 10 11 |
# File 'lib/estratto/data/base.rb', line 8 def initialize(data, formats = {}) @data = data @formats = formats end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/estratto/data/base.rb', line 6 def data @data end |
#formats ⇒ Object (readonly)
Returns the value of attribute formats.
6 7 8 |
# File 'lib/estratto/data/base.rb', line 6 def formats @formats end |
Instance Method Details
#coerce ⇒ Object
13 14 15 |
# File 'lib/estratto/data/base.rb', line 13 def coerce raise TypeCoercionNotFound end |