Class: Servactory::Context::Warehouse::Setup
- Inherits:
-
Object
- Object
- Servactory::Context::Warehouse::Setup
- Defined in:
- lib/servactory/context/warehouse/setup.rb
Instance Method Summary collapse
- #assign_inputs(arguments) ⇒ Object
- #assign_internal(name, value) ⇒ Object
- #assign_output(name, value) ⇒ Object
- #fetch_input(name) ⇒ Object
- #fetch_internal(name) ⇒ Object
- #fetch_output(name) ⇒ Object
-
#initialize(context) ⇒ Setup
constructor
A new instance of Setup.
- #inputs ⇒ Object
- #internals ⇒ Object
- #outputs ⇒ Object
Constructor Details
#initialize(context) ⇒ Setup
Returns a new instance of Setup.
7 8 9 |
# File 'lib/servactory/context/warehouse/setup.rb', line 7 def initialize(context) @context = context end |
Instance Method Details
#assign_inputs(arguments) ⇒ Object
11 12 13 |
# File 'lib/servactory/context/warehouse/setup.rb', line 11 def assign_inputs(arguments) context_data[:inputs].merge!(arguments) end |
#assign_internal(name, value) ⇒ Object
19 20 21 |
# File 'lib/servactory/context/warehouse/setup.rb', line 19 def assign_internal(name, value) assign_attribute(:internals, name, value) end |
#assign_output(name, value) ⇒ Object
27 28 29 |
# File 'lib/servactory/context/warehouse/setup.rb', line 27 def assign_output(name, value) assign_attribute(:outputs, name, value) end |
#fetch_input(name) ⇒ Object
15 16 17 |
# File 'lib/servactory/context/warehouse/setup.rb', line 15 def fetch_input(name) inputs.fetch(name, nil) end |
#fetch_internal(name) ⇒ Object
23 24 25 |
# File 'lib/servactory/context/warehouse/setup.rb', line 23 def fetch_internal(name) internals.fetch(name, nil) end |
#fetch_output(name) ⇒ Object
31 32 33 |
# File 'lib/servactory/context/warehouse/setup.rb', line 31 def fetch_output(name) outputs.fetch(name, nil) end |
#inputs ⇒ Object
35 36 37 |
# File 'lib/servactory/context/warehouse/setup.rb', line 35 def inputs @inputs ||= context_data.fetch(:inputs) end |
#internals ⇒ Object
39 40 41 |
# File 'lib/servactory/context/warehouse/setup.rb', line 39 def internals @internals ||= context_data.fetch(:internals) end |
#outputs ⇒ Object
43 44 45 |
# File 'lib/servactory/context/warehouse/setup.rb', line 43 def outputs @outputs ||= context_data.fetch(:outputs) end |