Module: LedgerSync::Ledgers::Mixins::SerializationMixin::ClassMethods
- Defined in:
- lib/ledger_sync/ledgers/mixins/serialization_mixin.rb
Instance Method Summary collapse
- #inferred_deserializer_class ⇒ Object
- #inferred_serialization_class(args = {}) ⇒ Object
- #inferred_serializer_class ⇒ Object
Instance Method Details
#inferred_deserializer_class ⇒ Object
8 9 10 |
# File 'lib/ledger_sync/ledgers/mixins/serialization_mixin.rb', line 8 def inferred_deserializer_class @inferred_deserializer_class ||= inferred_serialization_class(type: 'Deserializer') end |
#inferred_serialization_class(args = {}) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/ledger_sync/ledgers/mixins/serialization_mixin.rb', line 12 def inferred_serialization_class(args = {}) type = args.fetch(:type) inferred_config.base_module.const_get( "#{inferred_resource_class}::#{type.camelcase}" ) end |
#inferred_serializer_class ⇒ Object
20 21 22 |
# File 'lib/ledger_sync/ledgers/mixins/serialization_mixin.rb', line 20 def inferred_serializer_class @inferred_serializer_class ||= inferred_serialization_class(type: 'Serializer') end |