Class: Action::Base

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable, Wisper::Publisher
Defined in:
lib/action/base.rb

Defined Under Namespace

Classes: PlanningDSL

Instance Method Summary collapse

Instance Method Details

#configure {|config| ... } ⇒ Object

Yields:

  • (config)


9
10
11
12
# File 'lib/action/base.rb', line 9

def configure
  yield config if block_given?
  self
end

#expand_into(plan:) ⇒ Object

plan arg is an Action::Plan instance



21
22
23
# File 'lib/action/base.rb', line 21

def expand_into plan:
  plan PlanningDSL.new(plan: plan, action: self)
end

#plan(plan) ⇒ Object

default implementation plan arg is a planning DSL



16
17
18
# File 'lib/action/base.rb', line 16

def plan plan
  plan.myself if respond_to?(:run)
end