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.
275 276 277 278 |
# File 'lib/graphql/query/context.rb', line 275 def initialize(scoped_context, path) @path = path @scoped_context = scoped_context end |
Instance Method Details
#merge!(hash) ⇒ Object
280 281 282 |
# File 'lib/graphql/query/context.rb', line 280 def merge!(hash) @scoped_context.merge!(hash, at: @path) end |
#set!(key, value) ⇒ Object
284 285 286 287 |
# File 'lib/graphql/query/context.rb', line 284 def set!(key, value) @scoped_context.merge!({ key => value }, at: @path) nil end |