Class: Sorted::ActiveRecord::Builder
- Inherits:
-
Struct
- Object
- Struct
- Sorted::ActiveRecord::Builder
- Defined in:
- lib/sorted/activerecord/builder.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
-
#quoter ⇒ Object
Returns the value of attribute quoter.
-
#sort ⇒ Object
Returns the value of attribute sort.
Instance Method Summary collapse
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order
5 6 7 |
# File 'lib/sorted/activerecord/builder.rb', line 5 def order @order end |
#quoter ⇒ Object
Returns the value of attribute quoter
5 6 7 |
# File 'lib/sorted/activerecord/builder.rb', line 5 def quoter @quoter end |
#sort ⇒ Object
Returns the value of attribute sort
5 6 7 |
# File 'lib/sorted/activerecord/builder.rb', line 5 def sort @sort end |
Instance Method Details
#set ⇒ Object
14 15 16 |
# File 'lib/sorted/activerecord/builder.rb', line 14 def set uri + (sql - uri) end |
#sql ⇒ Object
10 11 12 |
# File 'lib/sorted/activerecord/builder.rb', line 10 def sql ::Sorted::SQLQuery.parse(order) end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/sorted/activerecord/builder.rb', line 18 def to_s ::Sorted::SQLQuery.encode(set, quoter) end |
#uri ⇒ Object
6 7 8 |
# File 'lib/sorted/activerecord/builder.rb', line 6 def uri ::Sorted::URIQuery.parse(sort) end |