Class: Cure::Builder::BaseBuilder
- Inherits:
-
Object
- Object
- Cure::Builder::BaseBuilder
- Includes:
- Database
- Defined in:
- lib/cure/builder/base_builder.rb
Direct Known Subclasses
AddBuilder, BlacklistBuilder, CopyBuilder, RemoveBuilder, RenameBuilder, WhitelistBuilder
Instance Method Summary collapse
- #call ⇒ void
-
#initialize(named_range, column, opts) ⇒ BaseBuilder
constructor
A new instance of BaseBuilder.
- #to_s ⇒ String (frozen)
- #with_database {|DatabaseService| ... } ⇒ Object
Methods included from Database
#database_service, #init_database
Constructor Details
#initialize(named_range, column, opts) ⇒ BaseBuilder
Returns a new instance of BaseBuilder.
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
#call ⇒ void
This method returns an undefined value.
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_s ⇒ String (frozen)
33 34 35 |
# File 'lib/cure/builder/base_builder.rb', line 33 def to_s "Base Builder" end |
#with_database {|DatabaseService| ... } ⇒ Object
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 |