Class: Attrocity::ValueExtractor
- Inherits:
-
Object
- Object
- Attrocity::ValueExtractor
- Defined in:
- lib/attrocity/value_extractor.rb
Instance Attribute Summary collapse
-
#coercer ⇒ Object
readonly
Returns the value of attribute coercer.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
Instance Method Summary collapse
-
#initialize(data, mapper:, coercer:) ⇒ ValueExtractor
constructor
A new instance of ValueExtractor.
- #value ⇒ Object
Constructor Details
#initialize(data, mapper:, coercer:) ⇒ ValueExtractor
Returns a new instance of ValueExtractor.
5 6 7 |
# File 'lib/attrocity/value_extractor.rb', line 5 def initialize(data, mapper:, coercer:) @data, @mapper, @coercer = data, mapper, coercer end |
Instance Attribute Details
#coercer ⇒ Object (readonly)
Returns the value of attribute coercer.
3 4 5 |
# File 'lib/attrocity/value_extractor.rb', line 3 def coercer @coercer end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/attrocity/value_extractor.rb', line 3 def data @data end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
3 4 5 |
# File 'lib/attrocity/value_extractor.rb', line 3 def mapper @mapper end |
Instance Method Details
#value ⇒ Object
9 10 11 |
# File 'lib/attrocity/value_extractor.rb', line 9 def value coerce(map) end |