Module: Porch::Organizer

Defined in:
lib/porch/organizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



3
4
5
# File 'lib/porch/organizer.rb', line 3

def context
  @context
end

Instance Method Details

#with(parameters = {}) {|chain| ... } ⇒ Object

Yields:

  • (chain)


5
6
7
8
9
10
11
12
# File 'lib/porch/organizer.rb', line 5

def with(parameters={})
  @context = Context.new parameters

  chain = StepChain.new(self)
  yield chain if block_given?

  chain.execute context
end