Module: Wrest::Components::AttributesContainer::Typecaster::InstanceMethods
- Defined in:
- lib/wrest/components/attributes_container/typecaster.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#initialize_with_typecasting(attributes = {}) ⇒ Object
:nodoc:
111 112 113 114 115 116 117 |
# File 'lib/wrest/components/attributes_container/typecaster.rb', line 111 def initialize_with_typecasting(attributes = {}) # :nodoc: initialize_without_typecasting(attributes) self.class.typecast_map.each do |key, typecaster| value = @attributes[key] @attributes[key] = typecaster.call(value) if value.is_a?(String) end end |