index-tanked 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,9 +2,25 @@ module IndexTanked
2
2
  class Configuration
3
3
 
4
4
  class << self
5
- attr_accessor :url, :index, :search_availability, :index_availability,
6
- :add_to_index_fallback, :delete_from_index_fallback, :timeout,
7
- :missing_activerecord_ids_handler
5
+ attr_accessor :url, :index, :search_availability, :index_availability, :timeout
6
+
7
+ def self.block_accessor(*fields)
8
+ fields.each do |field|
9
+ attr_writer field
10
+
11
+ eval("
12
+ def #{field}
13
+ if block_given?
14
+ @#{field} = Proc.new
15
+ else
16
+ @#{field}
17
+ end
18
+ end
19
+ ")
20
+ end
21
+ end
22
+
23
+ block_accessor :add_to_index_fallback, :delete_from_index_fallback, :missing_activerecord_ids_handler
8
24
 
9
25
  def search_available?
10
26
  if search_availability.is_a? Proc
@@ -1,3 +1,3 @@
1
1
  module IndexTanked
2
- GEM_VERSION = '0.1.15'
2
+ GEM_VERSION = '0.1.16'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: index-tanked
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 15
10
- version: 0.1.15
9
+ - 16
10
+ version: 0.1.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Kittelson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-07 00:00:00 -05:00
19
+ date: 2011-04-11 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency