Class: GraphQR::Configuration
- Inherits:
-
Object
- Object
- GraphQR::Configuration
- Defined in:
- lib/graphqr/configuration.rb
Overview
TODO: add documentation
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#paginator ⇒ Object
Returns the selected paginator.
-
#paginator=(paginator) ⇒ Object
Sets the preferred paginator TODO: support more than Pagy.
Instance Method Details
#configure {|_self| ... } ⇒ Object
7 8 9 |
# File 'lib/graphqr/configuration.rb', line 7 def configure yield self end |
#paginator ⇒ Object
Returns the selected paginator
12 13 14 15 16 17 18 |
# File 'lib/graphqr/configuration.rb', line 12 def paginator if instance_variable_defined? :@paginator @paginator else set_paginator end end |
#paginator=(paginator) ⇒ Object
Sets the preferred paginator TODO: support more than Pagy
23 24 25 26 27 28 29 30 |
# File 'lib/graphqr/configuration.rb', line 23 def paginator=(paginator) case paginator.to_sym when :pagy use_pagy else raise StandardError, "Unknown paginator: #{paginator}" end end |