Class: Cure::Builder::BaseBuilder

Inherits:
Object
  • Object
show all
Includes:
Database
Defined in:
lib/cure/builder/base_builder.rb

Instance Method Summary collapse

Methods included from Database

#database_service, #init_database

Constructor Details

#initialize(named_range, column, opts) ⇒ BaseBuilder

Returns a new instance of BaseBuilder.

Parameters:



21
22
23
24
25
# File 'lib/cure/builder/base_builder.rb', line 21

def initialize(named_range, column, opts)
  @named_range = named_range
  @column = column
  @opts = opts
end

Instance Method Details

#callvoid

This method returns an undefined value.

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/cure/builder/base_builder.rb', line 28

def call
  raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end

#to_sString (frozen)

Returns:



33
34
35
# File 'lib/cure/builder/base_builder.rb', line 33

def to_s
  "Base Builder"
end

#with_database {|DatabaseService| ... } ⇒ Object

Yields:

Raises:

  • StandardError



39
40
41
42
43
# File 'lib/cure/builder/base_builder.rb', line 39

def with_database(&block)
  raise "Missing block" unless block

  yield database_service
end