Class: Formwandler::FieldValueTransformer

Inherits:
Object
  • Object
show all
Defined in:
lib/formwandler/field_value_transformer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ FieldValueTransformer

Returns a new instance of FieldValueTransformer.



7
8
9
# File 'lib/formwandler/field_value_transformer.rb', line 7

def initialize(&block)
  instance_exec(&block)
end

Instance Attribute Details

#in_transformationObject (readonly)

Returns the value of attribute in_transformation.



5
6
7
# File 'lib/formwandler/field_value_transformer.rb', line 5

def in_transformation
  @in_transformation
end

#out_transformationObject (readonly)

Returns the value of attribute out_transformation.



5
6
7
# File 'lib/formwandler/field_value_transformer.rb', line 5

def out_transformation
  @out_transformation
end

Instance Method Details

#incoming(&block) ⇒ Object



11
12
13
# File 'lib/formwandler/field_value_transformer.rb', line 11

def incoming(&block)
  @in_transformation = block
end

#outgoing(&block) ⇒ Object



15
16
17
# File 'lib/formwandler/field_value_transformer.rb', line 15

def outgoing(&block)
  @out_transformation = block
end