Class: Gitlab::Graphql::NegatableArguments::TypeDefiner
- Inherits:
-
Object
- Object
- Gitlab::Graphql::NegatableArguments::TypeDefiner
- Defined in:
- lib/gitlab/graphql/negatable_arguments.rb
Instance Method Summary collapse
- #define! ⇒ Object
-
#initialize(resolver_class, type_definition) ⇒ TypeDefiner
constructor
A new instance of TypeDefiner.
- #negated_params_type ⇒ Object
Constructor Details
#initialize(resolver_class, type_definition) ⇒ TypeDefiner
Returns a new instance of TypeDefiner.
7 8 9 10 |
# File 'lib/gitlab/graphql/negatable_arguments.rb', line 7 def initialize(resolver_class, type_definition) @resolver_class = resolver_class @type_definition = type_definition end |
Instance Method Details
#define! ⇒ Object
12 13 14 |
# File 'lib/gitlab/graphql/negatable_arguments.rb', line 12 def define! negated_params_type.instance_eval(&@type_definition) end |
#negated_params_type ⇒ Object
16 17 18 |
# File 'lib/gitlab/graphql/negatable_arguments.rb', line 16 def negated_params_type @negated_params_type ||= existing_type || build_type end |