module Manufacturable::Factory
Public Instance Methods
build(key, *args)
click to toggle source
# File lib/manufacturable/factory.rb, line 9 def build(key, *args) return if @type.nil? Builder.build(@type, key, *args) end
build_all(key, *args)
click to toggle source
# File lib/manufacturable/factory.rb, line 25 def build_all(key, *args) return [] if @type.nil? Builder.build_all(@type, key, *args) end
build_many(key, *args)
click to toggle source
# File lib/manufacturable/factory.rb, line 21 def build_many(key, *args) build_all(key, *args) end
build_one(key, *args)
click to toggle source
# File lib/manufacturable/factory.rb, line 15 def build_one(key, *args) return if @type.nil? Builder.build_one(@type, key, *args) end
builds?(key)
click to toggle source
# File lib/manufacturable/factory.rb, line 31 def builds?(key) Builder.builds?(@type, key) end
manufactures(klass)
click to toggle source
# File lib/manufacturable/factory.rb, line 5 def manufactures(klass) @type = klass end