Class: Deli::Configuration
- Inherits:
-
Object
- Object
- Deli::Configuration
- Defined in:
- lib/deli/configuration.rb
Instance Attribute Summary collapse
-
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
-
#limit_key ⇒ Object
Returns the value of attribute limit_key.
-
#page_key ⇒ Object
Returns the value of attribute page_key.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#query_operators ⇒ Object
Returns the value of attribute query_operators.
-
#sort_direction ⇒ Object
Returns the value of attribute sort_direction.
-
#sort_key ⇒ Object
Returns the value of attribute sort_key.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/deli/configuration.rb', line 15 def initialize @per_page = 20 @sort_direction = "ASC" @sort_key = "sort" # or "order", etc. @limit_key = "limit" # or "per_page", etc. @page_key = "page" @separator = "_" # or "-" # this is not used, just thinking... # nested relationships as user[location][city]=san+diego @operators = { :gte => ":value..t", :gt => ":value...t", :lte => "t..:value", :lte => "t...:value", :range_inclusive => ":i..:f", # count=0..4 :range_exclusive => ":i...:f", # date=2011-08-10...2011-10-03 :in => [",", "+OR+"], # tags=ruby,javascript and tags=ruby+OR+javascript :nin => "-", # tags=-ruby,-javascript and tags=ruby+OR+javascript :all => "[:value]", # tags=[ruby,javascript] and tags=ruby+AND+javascript :nil => "[-]", # tags=[-] :not_nil => "[+]", # tags=ruby,[+] :asc => ["+", ""], :desc => "-", :geo => ":lat,:lng,:radius" # geo=20,-50,7 } end |
Instance Attribute Details
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def default_adapter @default_adapter end |
#limit_key ⇒ Object
Returns the value of attribute limit_key.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def limit_key @limit_key end |
#page_key ⇒ Object
Returns the value of attribute page_key.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def page_key @page_key end |
#per_page ⇒ Object
Returns the value of attribute per_page.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def per_page @per_page end |
#query_operators ⇒ Object
Returns the value of attribute query_operators.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def query_operators @query_operators end |
#sort_direction ⇒ Object
Returns the value of attribute sort_direction.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def sort_direction @sort_direction end |
#sort_key ⇒ Object
Returns the value of attribute sort_key.
13 14 15 |
# File 'lib/deli/configuration.rb', line 13 def sort_key @sort_key end |