Class: Naught::NullClassBuilder::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/naught/null_class_builder/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ Command

Returns a new instance of Command.



6
7
8
# File 'lib/naught/null_class_builder/command.rb', line 6

def initialize(builder)
  @builder = builder
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



4
5
6
# File 'lib/naught/null_class_builder/command.rb', line 4

def builder
  @builder
end

Instance Method Details

#callObject



10
11
12
# File 'lib/naught/null_class_builder/command.rb', line 10

def call
  fail(NotImplementedError.new('Method #call should be overriden in child classes'))
end

#defer(options = {}, &block) ⇒ Object



14
15
16
# File 'lib/naught/null_class_builder/command.rb', line 14

def defer(options = {}, &block)
  @builder.defer(options, &block)
end