Class: Sortiri::Utils
- Inherits:
-
Object
- Object
- Sortiri::Utils
- Defined in:
- lib/sortiri/utils.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#column_name ⇒ Object
readonly
Returns the value of attribute column_name.
-
#sort_string ⇒ Object
readonly
Returns the value of attribute sort_string.
Instance Method Summary collapse
- #direction ⇒ Object
- #icon_class ⇒ Object
-
#initialize(sort_string:, column_name:) ⇒ Utils
constructor
A new instance of Utils.
Constructor Details
#initialize(sort_string:, column_name:) ⇒ Utils
Returns a new instance of Utils.
7 8 9 10 11 |
# File 'lib/sortiri/utils.rb', line 7 def initialize(sort_string:, column_name:) @sort_string = sort_string @column_name = column_name.to_s @column = find_column end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
5 6 7 |
# File 'lib/sortiri/utils.rb', line 5 def column @column end |
#column_name ⇒ Object (readonly)
Returns the value of attribute column_name.
5 6 7 |
# File 'lib/sortiri/utils.rb', line 5 def column_name @column_name end |
#sort_string ⇒ Object (readonly)
Returns the value of attribute sort_string.
5 6 7 |
# File 'lib/sortiri/utils.rb', line 5 def sort_string @sort_string end |
Instance Method Details
#direction ⇒ Object
13 14 15 |
# File 'lib/sortiri/utils.rb', line 13 def direction column.toggle_direction end |
#icon_class ⇒ Object
17 18 19 |
# File 'lib/sortiri/utils.rb', line 17 def icon_class column.toggle_icon_class end |