Sha256: 5581863afe2b08c80bd42267534dddbc9be19159d2aac0132e3e106eaef30efe

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    # Provides default implementation from which builders can inherit from.
    class Abstract
      include Import[:settings]

      def initialize(builder: Builder, **)
        @builder = builder
        super(**)
      end

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

      protected

      attr_reader :builder
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysmith-7.3.0 lib/rubysmith/builders/abstract.rb
rubysmith-7.2.0 lib/rubysmith/builders/abstract.rb
rubysmith-7.1.0 lib/rubysmith/builders/abstract.rb
rubysmith-7.0.0 lib/rubysmith/builders/abstract.rb