Class: PyramidScheme::IndexProvider::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/pyramid_scheme/index_provider/base.rb

Direct Known Subclasses

FileSystem, S3

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



16
17
18
19
20
# File 'lib/pyramid_scheme/index_provider/base.rb', line 16

def initialize(options = {})
  @configuration = PyramidScheme::Configuration.new(options)
  ensure_required_options_are_present
  @copy_attempts = 0
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



14
15
16
# File 'lib/pyramid_scheme/index_provider/base.rb', line 14

def configuration
  @configuration
end

#copy_attemptsObject (readonly)

Returns the value of attribute copy_attempts.



14
15
16
# File 'lib/pyramid_scheme/index_provider/base.rb', line 14

def copy_attempts
  @copy_attempts
end

Class Method Details

.maximum_copy_attemptsObject



5
6
7
# File 'lib/pyramid_scheme/index_provider/base.rb', line 5

def maximum_copy_attempts
  5
end

.required_optionsObject



9
10
11
# File 'lib/pyramid_scheme/index_provider/base.rb', line 9

def required_options
  []
end

Instance Method Details

#index_in_progress?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/pyramid_scheme/index_provider/base.rb', line 22

def index_in_progress?
  raise_override
end

#lockObject



34
35
36
# File 'lib/pyramid_scheme/index_provider/base.rb', line 34

def lock
  raise_override
end

#process_indexObject



26
27
28
# File 'lib/pyramid_scheme/index_provider/base.rb', line 26

def process_index
  raise_override
end

#provide_client_with_indexObject



30
31
32
# File 'lib/pyramid_scheme/index_provider/base.rb', line 30

def provide_client_with_index
  raise_override
end

#retrieve_indexObject



38
39
40
# File 'lib/pyramid_scheme/index_provider/base.rb', line 38

def retrieve_index
  client_copy
end