Module: Servactory::Actions::DSL::ClassMethods

Defined in:
lib/servactory/actions/dsl.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)



89
90
91
92
93
94
95
96
97
# File 'lib/servactory/actions/dsl.rb', line 89

def method_missing(name, *args, &block)
  return method_missing_for_action_aliases(*args) if config.action_aliases.include?(name)

  if (action_shortcut = config.action_shortcuts.find_by(name:)).present?
    return method_missing_for_shortcuts_for_make(action_shortcut, *args)
  end

  super
end

Instance Method Details

#inherited(child) ⇒ Object



12
13
14
15
16
# File 'lib/servactory/actions/dsl.rb', line 12

def inherited(child)
  super

  child.send(:collection_of_stages).merge(collection_of_stages)
end