Module: Trax::Model::Attributes
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/trax/model/attributes.rb,
lib/trax/model/attributes/type.rb,
lib/trax/model/attributes/mixin.rb,
lib/trax/model/attributes/types.rb,
lib/trax/model/attributes/value.rb,
lib/trax/model/attributes/errors.rb,
lib/trax/model/attributes/fields.rb,
lib/trax/model/attributes/attribute.rb,
lib/trax/model/attributes/types/enum.rb,
lib/trax/model/attributes/types/json.rb,
lib/trax/model/attributes/definitions.rb,
lib/trax/model/attributes/types/array.rb,
lib/trax/model/attributes/types/string.rb,
lib/trax/model/attributes/types/boolean.rb,
lib/trax/model/attributes/types/integer.rb,
lib/trax/model/attributes/types/uuid_array.rb
Defined Under Namespace
Modules: Errors, Fields, Mixin, Types
Classes: Attribute, Definitions, Type, Value
Class Method Summary
collapse
Class Method Details
.[](key) ⇒ Object
27
28
29
|
# File 'lib/trax/model/attributes.rb', line 27
def self.[](key)
config.attribute_types[key]
end
|
.eager_autoload_types! ⇒ Object
35
36
37
|
# File 'lib/trax/model/attributes.rb', line 35
def self.eager_autoload_types!
::Trax::Model::Attributes::Types
end
|
.key?(type) ⇒ Boolean
31
32
33
|
# File 'lib/trax/model/attributes.rb', line 31
def self.key?(type)
config.attribute_types.has_key?(type)
end
|
.register_attribute_type(mod) ⇒ Object
21
22
23
24
25
|
# File 'lib/trax/model/attributes.rb', line 21
def self.register_attribute_type(mod)
key = mod.name.demodulize.underscore.to_sym
config.attribute_types[key] = mod
end
|