Class: IndexTanked::Configuration
- Inherits:
-
Object
- Object
- IndexTanked::Configuration
- Defined in:
- lib/index-tanked/configuration.rb
Class Attribute Summary collapse
-
.activerecord_queue ⇒ Object
Returns the value of attribute activerecord_queue.
-
.index ⇒ Object
Returns the value of attribute index.
-
.index_availability ⇒ Object
Returns the value of attribute index_availability.
-
.search_availability ⇒ Object
Returns the value of attribute search_availability.
-
.search_timeout ⇒ Object
Returns the value of attribute search_timeout.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
-
.url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Class Attribute Details
.activerecord_queue ⇒ Object
Returns the value of attribute activerecord_queue.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def activerecord_queue @activerecord_queue end |
.index ⇒ Object
Returns the value of attribute index.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def index @index end |
.index_availability ⇒ Object
Returns the value of attribute index_availability.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def index_availability @index_availability end |
.search_availability ⇒ Object
Returns the value of attribute search_availability.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def search_availability @search_availability end |
.search_timeout ⇒ Object
Returns the value of attribute search_timeout.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def search_timeout @search_timeout end |
.timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def timeout @timeout end |
.url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/index-tanked/configuration.rb', line 5 def url @url end |
Class Method Details
.block_accessor(*fields) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/index-tanked/configuration.rb', line 7 def self.block_accessor(*fields) fields.each do |field| attr_writer field eval(" def #{field} if block_given? @#{field} = Proc.new else @#{field} end end ") end end |
.index_available? ⇒ Boolean
33 34 35 36 37 38 39 40 |
# File 'lib/index-tanked/configuration.rb', line 33 def index_available? if index_availability.is_a? Proc index_availability.call else index_availability end end |
.search_available? ⇒ Boolean
25 26 27 28 29 30 31 |
# File 'lib/index-tanked/configuration.rb', line 25 def search_available? if search_availability.is_a? Proc search_availability.call else search_availability end end |