Module: Tanker::Configuration
- Included in:
- Tanker
- Defined in:
- lib/tanker/configuration.rb
Instance Method Summary collapse
Instance Method Details
#configuration ⇒ Object
3 4 5 |
# File 'lib/tanker/configuration.rb', line 3 def configuration @@configuration || raise(NotConfigured, "Please configure Tanker. Set Tanker.configuration = {:url => ''}") end |
#configuration=(new_configuration) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/tanker/configuration.rb', line 7 def configuration=(new_configuration) # the default pagination backend is WillPaginate @@configuration = new_configuration.tap do |_config| _config.replace({ :pagination_backend => :will_paginate }.merge(_config)) if _config.is_a?(Hash) end end |