Class: GqlSerializer::Configuration
- Inherits:
-
Object
- Object
- GqlSerializer::Configuration
- Defined in:
- lib/gql_serializer/configuration.rb
Constant Summary collapse
- CAMEL_CASE =
:camel
- SNAKE_CASE =
:snake
- NONE_CASE =
:none
- SUPPORTED_CASES =
[CAMEL_CASE, SNAKE_CASE, NONE_CASE]
Instance Attribute Summary collapse
-
#case ⇒ Object
Returns the value of attribute case.
-
#preload ⇒ Object
Returns the value of attribute preload.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 |
# File 'lib/gql_serializer/configuration.rb', line 10 def initialize reset end |
Instance Attribute Details
#case ⇒ Object
Returns the value of attribute case.
14 15 16 |
# File 'lib/gql_serializer/configuration.rb', line 14 def case @case end |
#preload ⇒ Object
Returns the value of attribute preload.
14 15 16 |
# File 'lib/gql_serializer/configuration.rb', line 14 def preload @preload end |
Instance Method Details
#reset ⇒ Object
21 22 23 24 |
# File 'lib/gql_serializer/configuration.rb', line 21 def reset @case = NONE_CASE @preload = false # Default will be true in version 3+ end |
#to_h ⇒ Object
26 27 28 |
# File 'lib/gql_serializer/configuration.rb', line 26 def to_h self.instance_values.symbolize_keys end |