Module: PDC::Resource::AttributeModifier
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/pdc/resource/attribute_modifier.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#initialize(attrs = {}) {|_self| ... } ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/pdc/resource/attribute_modifier.rb', line 19 def initialize(attrs = {}) super self.class.attribute_modifications.each do |what, *args| case what when :rename apply_attr_rename(*args) else PDC.logger.warn "Invalid attribute transformation #{what}: #{from} #{to}" end end yield self if block_given? end |