Class: Naught::NullClassBuilder::Command
- Inherits:
-
Object
- Object
- Naught::NullClassBuilder::Command
- Defined in:
- lib/naught/null_class_builder/command.rb
Direct Known Subclasses
Naught::NullClassBuilder::Commands::DefineExplicitConversions, Naught::NullClassBuilder::Commands::DefineImplicitConversions, Naught::NullClassBuilder::Commands::Mimic, Naught::NullClassBuilder::Commands::Pebble, Naught::NullClassBuilder::Commands::PredicatesReturn, Naught::NullClassBuilder::Commands::Singleton, Naught::NullClassBuilder::Commands::Traceable
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
- #call ⇒ Object
- #defer(options = {}, &block) ⇒ Object
-
#initialize(builder) ⇒ Command
constructor
A new instance of Command.
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
#builder ⇒ Object (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
#call ⇒ Object
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( = {}, &block) @builder.defer(, &block) end |