Class: GraphQL::Enum
- Inherits:
-
Object
- Object
- GraphQL::Enum
- Extended by:
- Definable
- Includes:
- NonNullWithBang
- Defined in:
- lib/graph_ql/enum.rb
Defined Under Namespace
Classes: EnumValue
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #coerce(value) ⇒ Object
-
#initialize {|_self, GraphQL::TypeDefiner.instance, GraphQL::FieldDefiner.instance, GraphQL::ArgumentDefiner.instance| ... } ⇒ Enum
constructor
A new instance of Enum.
- #kind ⇒ Object
- #value(name, description = nil, deprecation_reason: nil) ⇒ Object
Methods included from Definable
Methods included from NonNullWithBang
Constructor Details
#initialize {|_self, GraphQL::TypeDefiner.instance, GraphQL::FieldDefiner.instance, GraphQL::ArgumentDefiner.instance| ... } ⇒ Enum
Returns a new instance of Enum.
6 7 8 9 |
# File 'lib/graph_ql/enum.rb', line 6 def initialize @values = {} yield(self, GraphQL::TypeDefiner.instance, GraphQL::FieldDefiner.instance, GraphQL::ArgumentDefiner.instance) end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
5 6 7 |
# File 'lib/graph_ql/enum.rb', line 5 def values @values end |