Module: ShallowAttributes::Type
- Defined in:
- lib/shallow_attributes/type.rb,
lib/shallow_attributes/type/time.rb,
lib/shallow_attributes/type/array.rb,
lib/shallow_attributes/type/float.rb,
lib/shallow_attributes/type/string.rb,
lib/shallow_attributes/type/boolean.rb,
lib/shallow_attributes/type/integer.rb,
lib/shallow_attributes/type/date_time.rb
Overview
Namespace for standart type classes
Defined Under Namespace
Classes: Array, Boolean, DateTime, Float, Integer, InvalidValueError, String, Time
Class Method Summary collapse
-
.coerce(type, value, options = {}) ⇒ Object
Convert value object to specific Type class.
Class Method Details
.coerce(type, value, options = {}) ⇒ Object
Convert value object to specific Type class
41 42 43 |
# File 'lib/shallow_attributes/type.rb', line 41 def self.coerce(type, value, = {}) type_instance(type).coerce(value, ) end |