Class: Realize::Value::Static
- Inherits:
-
Object
- Object
- Realize::Value::Static
- Defined in:
- lib/realize/value/static.rb
Overview
Transformer that always returns a static value
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value: nil) ⇒ Static
constructor
A new instance of Static.
- #transform(_resolver, _value, _time, _record) ⇒ Object
Constructor Details
#initialize(value: nil) ⇒ Static
Returns a new instance of Static.
18 19 20 21 22 |
# File 'lib/realize/value/static.rb', line 18 def initialize(value: nil) @value = value freeze end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16 17 18 |
# File 'lib/realize/value/static.rb', line 16 def value @value end |
Instance Method Details
#transform(_resolver, _value, _time, _record) ⇒ Object
24 25 26 |
# File 'lib/realize/value/static.rb', line 24 def transform(_resolver, _value, _time, _record) value end |