Class: Rails::GraphQL::Request::Arguments::Lazy
- Inherits:
-
Delegator
- Object
- Delegator
- Rails::GraphQL::Request::Arguments::Lazy
- Defined in:
- lib/rails/graphql/request/arguments.rb
Instance Attribute Summary collapse
-
#var_name ⇒ Object
readonly
Returns the value of attribute var_name.
Class Method Summary collapse
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #__setobj__ ⇒ Object
-
#initialize(var_name) ⇒ Lazy
constructor
A new instance of Lazy.
Constructor Details
#initialize(var_name) ⇒ Lazy
Returns a new instance of Lazy.
25 26 27 |
# File 'lib/rails/graphql/request/arguments.rb', line 25 def initialize(var_name) @var_name = var_name end |
Instance Attribute Details
#var_name ⇒ Object (readonly)
Returns the value of attribute var_name.
19 20 21 |
# File 'lib/rails/graphql/request/arguments.rb', line 19 def var_name @var_name end |
Class Method Details
.[](key) ⇒ Object
21 22 23 |
# File 'lib/rails/graphql/request/arguments.rb', line 21 def self.[](key) new(key) end |
Instance Method Details
#__getobj__ ⇒ Object
29 30 31 |
# File 'lib/rails/graphql/request/arguments.rb', line 29 def __getobj__ Arguments.operation&.variables&.dig(var_name) end |
#__setobj__ ⇒ Object
33 34 35 |
# File 'lib/rails/graphql/request/arguments.rb', line 33 def __setobj__(*) raise FrozenError end |