lib/democritus/class_builder/command.rb in democritus-0.2.0 vs lib/democritus/class_builder/command.rb in democritus-0.2.1

- old
+ new

@@ -1,5 +1,7 @@ +require 'forwardable' + module Democritus class ClassBuilder # @api public # # An abstract class useful in composing additional Democritus::Commands @@ -15,19 +17,20 @@ def initialize(*, builder:) self.builder = builder end # @api public - # # @abstract Subclass and override #call to implement + # + # Responsible for applying changes to the class that is being built. + # + # @return void def call fail(NotImplementedError, 'Method #call should be overriden in child classes') end - # @api private - def defer(options = {}, &block) - builder.defer(options, &block) - end + extend Forwardable + def_delegator :builder, :defer private attr_accessor :builder end