Module: Avromatic::Model::Configurable::ClassMethods
- Defined in:
- lib/avromatic/model/configurable.rb
Instance Method Summary collapse
- #key_avro_field_names ⇒ Object
- #key_avro_field_references ⇒ Object
- #key_avro_fields_by_name ⇒ Object
- #nested_models ⇒ Object
- #value_avro_field_names ⇒ Object
- #value_avro_field_references ⇒ Object
- #value_avro_fields_by_name ⇒ Object
Instance Method Details
#key_avro_field_names ⇒ Object
33 34 35 |
# File 'lib/avromatic/model/configurable.rb', line 33 def key_avro_field_names @key_avro_field_names ||= key_avro_schema.fields.map(&:name).map(&:to_sym).freeze end |
#key_avro_field_references ⇒ Object
43 44 45 46 47 |
# File 'lib/avromatic/model/configurable.rb', line 43 def key_avro_field_references @key_avro_field_references ||= key_avro_schema.fields.map do |field| Avromatic::Model::Configurable::FieldReference.new(field.name) end.freeze end |
#key_avro_fields_by_name ⇒ Object
53 54 55 |
# File 'lib/avromatic/model/configurable.rb', line 53 def key_avro_fields_by_name @key_avro_fields_by_name ||= mapped_by_name(key_avro_schema) end |
#nested_models ⇒ Object
57 58 59 |
# File 'lib/avromatic/model/configurable.rb', line 57 def nested_models config.nested_models || Avromatic.nested_models end |
#value_avro_field_names ⇒ Object
29 30 31 |
# File 'lib/avromatic/model/configurable.rb', line 29 def value_avro_field_names @value_avro_field_names ||= value_avro_schema.fields.map(&:name).map(&:to_sym).freeze end |
#value_avro_field_references ⇒ Object
37 38 39 40 41 |
# File 'lib/avromatic/model/configurable.rb', line 37 def value_avro_field_references @value_avro_field_references ||= value_avro_schema.fields.map do |field| Avromatic::Model::Configurable::FieldReference.new(field.name) end.freeze end |
#value_avro_fields_by_name ⇒ Object
49 50 51 |
# File 'lib/avromatic/model/configurable.rb', line 49 def value_avro_fields_by_name @value_avro_fields_by_name ||= mapped_by_name(value_avro_schema) end |