Class: TypicalSort::Configuration
- Inherits:
-
Object
- Object
- TypicalSort::Configuration
- Defined in:
- lib/typical_sort/configuration.rb
Instance Attribute Summary collapse
-
#default_direction ⇒ Object
Returns the value of attribute default_direction.
-
#direction_param ⇒ Object
Returns the value of attribute direction_param.
-
#invalid_sort ⇒ Object
Returns the value of attribute invalid_sort.
-
#nulls ⇒ Object
Returns the value of attribute nulls.
-
#sort_param ⇒ Object
Returns the value of attribute sort_param.
-
#tie_breaker ⇒ Object
Returns the value of attribute tie_breaker.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/typical_sort/configuration.rb', line 12 def initialize @sort_param = :sort @direction_param = :sort_dir @default_direction = :asc @invalid_sort = :ignore @tie_breaker = :primary_key @nulls = { asc: :last, desc: :first } end |
Instance Attribute Details
#default_direction ⇒ Object
Returns the value of attribute default_direction.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def default_direction @default_direction end |
#direction_param ⇒ Object
Returns the value of attribute direction_param.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def direction_param @direction_param end |
#invalid_sort ⇒ Object
Returns the value of attribute invalid_sort.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def invalid_sort @invalid_sort end |
#nulls ⇒ Object
Returns the value of attribute nulls.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def nulls @nulls end |
#sort_param ⇒ Object
Returns the value of attribute sort_param.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def sort_param @sort_param end |
#tie_breaker ⇒ Object
Returns the value of attribute tie_breaker.
5 6 7 |
# File 'lib/typical_sort/configuration.rb', line 5 def tie_breaker @tie_breaker end |