Module: Industrialist::Factory

Defined in:
lib/industrialist/factory.rb

Instance Method Summary collapse

Instance Method Details

#build(key, *args) ⇒ Object



9
10
11
12
13
# File 'lib/industrialist/factory.rb', line 9

def build(key, *args)
  return if @type.nil?

  Builder.build(@type, key, *args)
end

#manufactures(klass) ⇒ Object



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

def manufactures(klass)
  @type = Type.industrialize(klass)
end