Exception: GraphQL::InvalidNameError
- Inherits:
-
ExecutionError
- Object
- StandardError
- Error
- ExecutionError
- GraphQL::InvalidNameError
- Defined in:
- lib/graphql/invalid_name_error.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#valid_regex ⇒ Object
readonly
Returns the value of attribute valid_regex.
Attributes inherited from ExecutionError
#ast_node, #extensions, #options, #path
Instance Method Summary collapse
-
#initialize(name, valid_regex) ⇒ InvalidNameError
constructor
A new instance of InvalidNameError.
Methods inherited from ExecutionError
Constructor Details
#initialize(name, valid_regex) ⇒ InvalidNameError
Returns a new instance of InvalidNameError
5 6 7 8 9 |
# File 'lib/graphql/invalid_name_error.rb', line 5 def initialize(name, valid_regex) @name = name @valid_regex = valid_regex super("Names must match #{@valid_regex.inspect} but '#{@name}' does not") end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/graphql/invalid_name_error.rb', line 4 def name @name end |
#valid_regex ⇒ Object (readonly)
Returns the value of attribute valid_regex
4 5 6 |
# File 'lib/graphql/invalid_name_error.rb', line 4 def valid_regex @valid_regex end |