Class: GraphQL::Query::Context::Scoped
- Inherits:
-
Object
- Object
- GraphQL::Query::Context::Scoped
- Defined in:
- lib/graphql/query/context.rb
Instance Method Summary collapse
-
#initialize(scoped_context, path) ⇒ Scoped
constructor
A new instance of Scoped.
- #merge!(hash) ⇒ Object
- #set!(key, value) ⇒ Object
Constructor Details
#initialize(scoped_context, path) ⇒ Scoped
Returns a new instance of Scoped.
348 349 350 351 |
# File 'lib/graphql/query/context.rb', line 348 def initialize(scoped_context, path) @path = path @scoped_context = scoped_context end |
Instance Method Details
#merge!(hash) ⇒ Object
353 354 355 |
# File 'lib/graphql/query/context.rb', line 353 def merge!(hash) @scoped_context.merge!(hash, at: @path) end |
#set!(key, value) ⇒ Object
357 358 359 360 |
# File 'lib/graphql/query/context.rb', line 357 def set!(key, value) @scoped_context.merge!({ key => value }, at: @path) nil end |