Class: ChinoRuby::SortOption
- Inherits:
-
CheckValues
- Object
- CheckValues
- ChinoRuby::SortOption
- Defined in:
- lib/chino_ruby/classes.rb
Direct Known Subclasses
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.
1321 1322 1323 1324 1325 1326 |
# File 'lib/chino_ruby/classes.rb', line 1321 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.
1319 1320 1321 |
# File 'lib/chino_ruby/classes.rb', line 1319 def field @field end |
#order ⇒ Object
Returns the value of attribute order.
1319 1320 1321 |
# File 'lib/chino_ruby/classes.rb', line 1319 def order @order end |
Instance Method Details
#to_json ⇒ Object
1328 1329 1330 |
# File 'lib/chino_ruby/classes.rb', line 1328 def to_json {"field": field, "order": order}.to_json end |