Module: ActiveModel::Type
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/date.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/time.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/float.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/value.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/binary.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/string.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/boolean.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/decimal.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/integer.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/registry.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/date_time.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/big_integer.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/helpers/mutable.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/helpers/numeric.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/helpers/timezone.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/immutable_string.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/helpers/time_value.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type/helpers/accepts_multiparameter_time.rb
Defined Under Namespace
Modules: Helpers Classes: BigInteger, Binary, Boolean, Date, DateTime, Decimal, Float, ImmutableString, Integer, Registry, String, Time, Value
Class Attribute Summary collapse
-
.registry ⇒ Object
:nodoc:.
Class Method Summary collapse
-
.default_value ⇒ Object
:nodoc:.
-
.lookup ⇒ Object
:nodoc:.
-
.register(type_name, klass = nil, &block) ⇒ Object
Add a new type to the registry, allowing it to be referenced as a symbol by attribute.
Class Attribute Details
.registry ⇒ Object
:nodoc:
25 26 27 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type.rb', line 25 def registry @registry end |
Class Method Details
.default_value ⇒ Object
:nodoc:
37 38 39 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type.rb', line 37 def default_value # :nodoc: @default_value ||= Value.new end |
.lookup ⇒ Object
:nodoc:
33 34 35 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type.rb', line 33 def lookup(...) # :nodoc: registry.lookup(...) end |
.register(type_name, klass = nil, &block) ⇒ Object
Add a new type to the registry, allowing it to be referenced as a symbol by attribute.
29 30 31 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/type.rb', line 29 def register(type_name, klass = nil, &block) registry.register(type_name, klass, &block) end |