Class: GQL::Node::ExecutionContext
- Inherits:
-
Object
- Object
- GQL::Node::ExecutionContext
- Defined in:
- lib/gql/node.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #execute(method, args = []) ⇒ Object
-
#initialize(target, context) ⇒ ExecutionContext
constructor
A new instance of ExecutionContext.
Constructor Details
#initialize(target, context) ⇒ ExecutionContext
Returns a new instance of ExecutionContext.
11 12 13 |
# File 'lib/gql/node.rb', line 11 def initialize(target, context) @target, @context = target, context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
9 10 11 |
# File 'lib/gql/node.rb', line 9 def context @context end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
9 10 11 |
# File 'lib/gql/node.rb', line 9 def target @target end |
Instance Method Details
#execute(method, args = []) ⇒ Object
15 16 17 |
# File 'lib/gql/node.rb', line 15 def execute(method, args = []) instance_exec(*args, &method) end |