Module: ActiveModel::Type
- Defined in:
- lib/active_model/type/registry.rb,
lib/active_model/type.rb,
lib/active_model/type/date.rb,
lib/active_model/type/time.rb,
lib/active_model/type/float.rb,
lib/active_model/type/value.rb,
lib/active_model/type/binary.rb,
lib/active_model/type/string.rb,
lib/active_model/type/boolean.rb,
lib/active_model/type/decimal.rb,
lib/active_model/type/integer.rb,
lib/active_model/type/date_time.rb,
lib/active_model/type/big_integer.rb,
lib/active_model/type/helpers/mutable.rb,
lib/active_model/type/helpers/numeric.rb,
lib/active_model/type/immutable_string.rb,
lib/active_model/type/helpers/time_value.rb,
lib/active_model/type/helpers/accepts_multiparameter_time.rb
Overview
:stopdoc:
Defined Under Namespace
Modules: Helpers Classes: BigInteger, Binary, Boolean, Date, DateTime, Decimal, Float, ImmutableString, Integer, Registration, Registry, String, Time, Value
Class Attribute Summary collapse
-
.registry ⇒ Object
:nodoc:.
Class Method Summary collapse
-
.lookup(*args, **kwargs) ⇒ Object
:nodoc:.
-
.register(type_name, klass = nil, **options, &block) ⇒ Object
Add a new type to the registry, allowing it to be get through ActiveModel::Type#lookup.
Class Attribute Details
.registry ⇒ Object
:nodoc:
23 24 25 |
# File 'lib/active_model/type.rb', line 23 def registry @registry end |
Class Method Details
.lookup(*args, **kwargs) ⇒ Object
:nodoc:
30 31 32 |
# File 'lib/active_model/type.rb', line 30 def lookup(*args, **kwargs) # :nodoc: registry.lookup(*args, **kwargs) end |
.register(type_name, klass = nil, **options, &block) ⇒ Object
Add a new type to the registry, allowing it to be get through ActiveModel::Type#lookup
26 27 28 |
# File 'lib/active_model/type.rb', line 26 def register(type_name, klass = nil, **, &block) registry.register(type_name, klass, **, &block) end |