Class: SortOption
- Inherits:
-
CheckValues
- Object
- CheckValues
- SortOption
- Defined in:
- lib/chino_ruby.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#order ⇒ Object
Returns the value of attribute order.
Instance Method Summary collapse
-
#initialize(field, order) ⇒ SortOption
constructor
A new instance of SortOption.
- #to_json ⇒ Object
Methods inherited from CheckValues
#check_boolean, #check_int, #check_json, #check_string
Constructor Details
#initialize(field, order) ⇒ SortOption
Returns a new instance of SortOption.
1377 1378 1379 1380 1381 1382 |
# File 'lib/chino_ruby.rb', line 1377 def initialize(field, order) check_string(field) check_string(order) self.field = field self.order = order end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
1375 1376 1377 |
# File 'lib/chino_ruby.rb', line 1375 def field @field end |
#order ⇒ Object
Returns the value of attribute order.
1375 1376 1377 |
# File 'lib/chino_ruby.rb', line 1375 def order @order end |
Instance Method Details
#to_json ⇒ Object
1384 1385 1386 |
# File 'lib/chino_ruby.rb', line 1384 def to_json {"field": field, "order": order}.to_json end |