Class: GraphQL::DateEncodingError
- Inherits:
-
RuntimeTypeError
- Object
- RuntimeTypeError
- GraphQL::DateEncodingError
- Defined in:
- lib/graphql/date_encoding_error.rb
Overview
This error is raised when Types::ISO8601Date is asked to return a value
that cannot be parsed to a Ruby Date.
See GraphQL::Types::ISO8601Date which raises this error
Instance Attribute Summary collapse
-
#date_value ⇒ Object
readonly
The value which couldn't be encoded : untyped.
Instance Method Summary collapse
-
#initialize(value) ⇒ DateEncodingError
constructor
: (untyped value) -> void.
Constructor Details
#initialize(value) ⇒ DateEncodingError
: (untyped value) -> void
15 16 17 18 |
# File 'lib/graphql/date_encoding_error.rb', line 15 def initialize(value) @date_value = value super("Date cannot be parsed: #{value}. \nDate must be able to be parsed as a Ruby Date object.") end |
Instance Attribute Details
#date_value ⇒ Object (readonly)
The value which couldn't be encoded : untyped
12 13 14 |
# File 'lib/graphql/date_encoding_error.rb', line 12 def date_value @date_value end |