Class: Stormtroopers::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/stormtroopers/factory.rb

Direct Known Subclasses

DelayedJobFactory, DummyFactory

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Factory

Returns a new instance of Factory.



5
6
7
8
# File 'lib/stormtroopers/factory.rb', line 5

def initialize(options = {})
  @options = options
  @name = options[:name]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/stormtroopers/factory.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/stormtroopers/factory.rb', line 3

def options
  @options
end

Instance Method Details

#loggerObject



14
15
16
# File 'lib/stormtroopers/factory.rb', line 14

def logger
  Manager.logger
end

#produceObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/stormtroopers/factory.rb', line 10

def produce
  raise NotImplementedError.new("produce method not implemented on the factory")
end