Class: Remi::Transform::Constant

Inherits:
Remi::Transform show all
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

Methods inherited from Remi::Transform

#call, #to_proc

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