Class: Rubysmith::Builders::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/builders/abstract.rb

Overview

Provides default implementation from which builders can inherit from.

Instance Method Summary collapse

Constructor Details

#initialize(builder: Builder) ⇒ Abstract

Returns a new instance of Abstract.



9
10
11
12
# File 'lib/rubysmith/builders/abstract.rb', line 9

def initialize(builder: Builder, **)
  @builder = -> settings, **keywords { builder.new settings, logger:, **keywords }
  super(**)
end

Instance Method Details

#callObject



14
15
16
17
# File 'lib/rubysmith/builders/abstract.rb', line 14

def call
  fail NoMethodError,
       "`#{self.class}##{__method__} #{method(__method__).parameters}` must be implemented."
end