Module: Porch::Organizer
- Defined in:
- lib/porch/organizer.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/porch/organizer.rb', line 5 def context @context end |
Class Method Details
.included(base) ⇒ Object
18 19 20 21 22 |
# File 'lib/porch/organizer.rb', line 18 def self.included(base) base.class_eval do include Rescuable end end |
Instance Method Details
#with(parameters = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/porch/organizer.rb', line 7 def with(parameters={}) @context = Context.new parameters handle_exceptions do chain = StepChain.new(self) yield chain if block_given? chain.execute context end end |