Module: ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods
- Defined in:
- lib/active_model/type/helpers/accepts_multiparameter_time.rb
Instance Method Summary collapse
- #assert_valid_value(value) ⇒ Object
- #cast(value) ⇒ Object
- #serialize(value) ⇒ Object
- #value_constructed_by_mass_assignment?(value) ⇒ Boolean
Instance Method Details
#assert_valid_value(value) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/active_model/type/helpers/accepts_multiparameter_time.rb', line 20 def assert_valid_value(value) if value.is_a?(Hash) value_from_multiparameter_assignment(value) else super(value) end end |
#cast(value) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/active_model/type/helpers/accepts_multiparameter_time.rb', line 12 def cast(value) if value.is_a?(Hash) value_from_multiparameter_assignment(value) else super(value) end end |
#serialize(value) ⇒ Object
8 9 10 |
# File 'lib/active_model/type/helpers/accepts_multiparameter_time.rb', line 8 def serialize(value) super(cast(value)) end |
#value_constructed_by_mass_assignment?(value) ⇒ Boolean
28 29 30 |
# File 'lib/active_model/type/helpers/accepts_multiparameter_time.rb', line 28 def value_constructed_by_mass_assignment?(value) value.is_a?(Hash) end |