Class: Remi::Transform::Constant
- Inherits:
-
Remi::Transform
- Object
- Remi::Transform
- Remi::Transform::Constant
- Defined in:
- lib/remi/transform.rb
Overview
Public: Simply returns a constant.
constant - The constant value to return.
Examples:
Constant.new('ewoks').to_proc.call('whatever') # => 'ewoks'
Instance Attribute Summary
Attributes inherited from Remi::Transform
#multi_arg, #source_metadata, #target_metadata
Instance Method Summary collapse
-
#initialize(constant, *args, **kargs, &block) ⇒ Constant
constructor
A new instance of Constant.
- #transform(values) ⇒ Object
Methods inherited from Remi::Transform
Constructor Details
#initialize(constant, *args, **kargs, &block) ⇒ Constant
364 365 366 367 |
# File 'lib/remi/transform.rb', line 364 def initialize(constant, *args, **kargs, &block) super @constant = constant end |
Instance Method Details
#transform(values) ⇒ Object
369 370 371 |
# File 'lib/remi/transform.rb', line 369 def transform(values) @constant end |