Module: LedgerSync::Serialization::AttributeSetMixin
- Included in:
- DeserializerAttributeSet, SerializerAttributeSet
- Defined in:
- lib/ledger_sync/serialization/attribute_set_mixin.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#serializer_class ⇒ Object
readonly
Returns the value of attribute serializer_class.
Instance Method Summary collapse
Methods included from Util::Mixins::DelegateIterableMethodsMixin
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/ledger_sync/serialization/attribute_set_mixin.rb', line 8 def attributes @attributes end |
#serializer_class ⇒ Object (readonly)
Returns the value of attribute serializer_class.
8 9 10 |
# File 'lib/ledger_sync/serialization/attribute_set_mixin.rb', line 8 def serializer_class @serializer_class end |
Instance Method Details
#add(_attribute) ⇒ Object
18 19 20 |
# File 'lib/ledger_sync/serialization/attribute_set_mixin.rb', line 18 def add(_attribute) raise NotImplementedError end |
#hash_attribute?(key) ⇒ Boolean
22 23 24 |
# File 'lib/ledger_sync/serialization/attribute_set_mixin.rb', line 22 def hash_attribute?(key) hash_attribute_keyed_hash.include?(key.to_s) end |
#initialize(args = {}) ⇒ Object
13 14 15 16 |
# File 'lib/ledger_sync/serialization/attribute_set_mixin.rb', line 13 def initialize(args = {}) @attributes = {} @serializer_class = args.fetch(:serializer_class) end |