Module: Avromatic::Model::Configurable::ClassMethods
- Defined in:
- lib/avromatic/model/configurable.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #key_avro_field_names ⇒ Object
- #key_avro_fields_by_name ⇒ Object
- #nested_models ⇒ Object
- #value_avro_field_names ⇒ Object
- #value_avro_fields_by_name ⇒ Object
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
12 13 14 |
# File 'lib/avromatic/model/configurable.rb', line 12 def config @config end |
Instance Method Details
#key_avro_field_names ⇒ Object
19 20 21 |
# File 'lib/avromatic/model/configurable.rb', line 19 def key_avro_field_names @key_avro_field_names ||= key_avro_schema.fields.map(&:name).map(&:to_sym).freeze end |
#key_avro_fields_by_name ⇒ Object
27 28 29 |
# File 'lib/avromatic/model/configurable.rb', line 27 def key_avro_fields_by_name @key_avro_fields_by_name ||= mapped_by_name(key_avro_schema) end |
#nested_models ⇒ Object
31 32 33 |
# File 'lib/avromatic/model/configurable.rb', line 31 def nested_models config.nested_models || Avromatic.nested_models end |
#value_avro_field_names ⇒ Object
15 16 17 |
# File 'lib/avromatic/model/configurable.rb', line 15 def value_avro_field_names @value_avro_field_names ||= value_avro_schema.fields.map(&:name).map(&:to_sym).freeze end |
#value_avro_fields_by_name ⇒ Object
23 24 25 |
# File 'lib/avromatic/model/configurable.rb', line 23 def value_avro_fields_by_name @value_avro_fields_by_name ||= mapped_by_name(value_avro_schema) end |