Class: Igniter::Embed::ContractHandle
- Inherits:
-
Object
- Object
- Igniter::Embed::ContractHandle
- Defined in:
- lib/igniter/embed/contract_handle.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(inputs = {}, **keyword_inputs) ⇒ Object
- #compile ⇒ Object
-
#initialize(name:, container:) ⇒ ContractHandle
constructor
A new instance of ContractHandle.
Constructor Details
#initialize(name:, container:) ⇒ ContractHandle
Returns a new instance of ContractHandle.
8 9 10 11 12 |
# File 'lib/igniter/embed/contract_handle.rb', line 8 def initialize(name:, container:) @name = name.to_sym @container = container freeze end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
6 7 8 |
# File 'lib/igniter/embed/contract_handle.rb', line 6 def container @container end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/igniter/embed/contract_handle.rb', line 6 def name @name end |
Instance Method Details
#call(inputs = {}, **keyword_inputs) ⇒ Object
18 19 20 |
# File 'lib/igniter/embed/contract_handle.rb', line 18 def call(inputs = {}, **keyword_inputs) container.call(name, inputs.merge(keyword_inputs)) end |
#compile ⇒ Object
14 15 16 |
# File 'lib/igniter/embed/contract_handle.rb', line 14 def compile container.compile(name) end |