Class: BB::Converter::Order
- Inherits:
-
Object
- Object
- BB::Converter::Order
- Defined in:
- lib/b_b/converter/order.rb
Constant Summary collapse
- TEMPLATE =
"%s %s".freeze
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#sort_key ⇒ Object
readonly
Returns the value of attribute sort_key.
Class Method Summary collapse
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(column, options = {}) ⇒ Order
constructor
A new instance of Order.
Constructor Details
#initialize(column, options = {}) ⇒ Order
8 9 10 11 |
# File 'lib/b_b/converter/order.rb', line 8 def initialize(column, = {}) @column = column @sort_key = format_sort_key([:sort_key]) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
6 7 8 |
# File 'lib/b_b/converter/order.rb', line 6 def column @column end |
#sort_key ⇒ Object (readonly)
Returns the value of attribute sort_key.
6 7 8 |
# File 'lib/b_b/converter/order.rb', line 6 def sort_key @sort_key end |
Class Method Details
.convert(column, options = {}) ⇒ Object
24 25 26 |
# File 'lib/b_b/converter/order.rb', line 24 def convert(column, = {}) new(column, ).convert end |
Instance Method Details
#convert ⇒ Object
13 14 15 |
# File 'lib/b_b/converter/order.rb', line 13 def convert format(TEMPLATE, column, sort_key) end |