Module: LedgerSync::Ledgers::Mixins::InferResourceClassMixin::ClassMethods
- Defined in:
- lib/ledger_sync/ledgers/mixins/infer_resource_class_mixin.rb
Instance Method Summary collapse
Instance Method Details
#inferred_resource_class ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ledger_sync/ledgers/mixins/infer_resource_class_mixin.rb', line 10 def inferred_resource_class @inferred_resource_class ||= begin base_module = inferred_config.base_module if name.include?('::Operations::') base_module.const_get(name.split('::Operations::').first) else base_module.const_get(name.split(base_module.name).last.split('::')[1]) end end end |