Module: Manufacturable

Defined in:
lib/manufacturable.rb,
lib/manufacturable/item.rb,
lib/manufacturable/config.rb,
lib/manufacturable/builder.rb,
lib/manufacturable/factory.rb,
lib/manufacturable/railtie.rb,
lib/manufacturable/version.rb,
lib/manufacturable/injector.rb,
lib/manufacturable/registrar.rb,
lib/manufacturable/dispatcher.rb,
lib/manufacturable/object_factory.rb,
lib/manufacturable/simple_registrar.rb

Defined Under Namespace

Modules: Factory, Item Classes: Builder, Config, Dispatcher, Injector, ObjectFactory, Railtie, Registrar, SimpleRegistrar

Constant Summary collapse

VERSION =
"2.2.0"

Class Method Summary collapse

Class Method Details

.build(*args, **kwargs, &block) ⇒ Object



11
12
13
# File 'lib/manufacturable.rb', line 11

def self.build(*args, **kwargs, &block)
  Builder.build(*args, **kwargs, &block)
end

.build_all(*args, **kwargs, &block) ⇒ Object



23
24
25
# File 'lib/manufacturable.rb', line 23

def self.build_all(*args, **kwargs, &block)
  Builder.build_all(*args, **kwargs, &block)
end

.build_many(*args, **kwargs, &block) ⇒ Object



19
20
21
# File 'lib/manufacturable.rb', line 19

def self.build_many(*args, **kwargs, &block)
  Builder.build_all(*args, **kwargs, &block)
end

.build_one(*args, **kwargs, &block) ⇒ Object



15
16
17
# File 'lib/manufacturable.rb', line 15

def self.build_one(*args, **kwargs, &block)
  Builder.build_one(*args, **kwargs, &block)
end

.builds?(type, key) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/manufacturable.rb', line 27

def self.builds?(type, key)
  Builder.builds?(type, key)
end

.config {|Config| ... } ⇒ Object

Yields:



39
40
41
42
# File 'lib/manufacturable.rb', line 39

def self.config
  yield(Config)
  Config.load_paths
end

.register_dependency(key, value) ⇒ Object



31
32
33
# File 'lib/manufacturable.rb', line 31

def self.register_dependency(key, value)
  SimpleRegistrar.register(key, value)
end

.reset!Object



35
36
37
# File 'lib/manufacturable.rb', line 35

def self.reset!
  Registrar.reset!
end