Class: Calibrate::Configurable::SettingsCopier

Inherits:
FieldProcessor show all
Defined in:
lib/calibrate/configurable/field-processor.rb

Instance Attribute Summary

Attributes inherited from FieldProcessor

#field_names, #source

Instance Method Summary collapse

Methods inherited from FieldProcessor

#filter, #initialize, #to

Constructor Details

This class inherits a constructor from Calibrate::Configurable::FieldProcessor

Instance Method Details

#can_process(field, target) ⇒ Object



35
36
37
# File 'lib/calibrate/configurable/field-processor.rb', line 35

def can_process(field, target)
  super and not( field.unset_on?(source) and field.unset_on?(target) )
end

#filter_attributeObject



31
32
33
# File 'lib/calibrate/configurable/field-processor.rb', line 31

def filter_attribute
  :copiable
end

#value(field) ⇒ Object



39
40
41
# File 'lib/calibrate/configurable/field-processor.rb', line 39

def value(field)
  return field.copy_from(source)
end