Sha256: 2753b6827577e22e8dfbf3eff0be0548381abfc10da296b6fad17cdb42ecf48d

Contents?: true

Size: 511 Bytes

Versions: 14

Compression:

Stored size: 511 Bytes

Contents

require 'config_builder/class_registry'

module ConfigBuilder
  module Loader
    @registry = ConfigBuilder::ClassRegistry.new(:loader)

    def self.register(identifier, klass)
      @registry.register(identifier, klass)
    end

    def self.retrieve(identifier)
      @registry.retrieve(identifier)
    end

    def self.generate(identifier, method_name, method_value)
      obj = retrieve(identifier).new
      obj.send(method_name, method_value)
    end

    require 'config_builder/loader/yaml'
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vagrant-config_builder-0.11.0 lib/config_builder/loader.rb
vagrant-config_builder-0.10.1 lib/config_builder/loader.rb
vagrant-config_builder-0.10.0 lib/config_builder/loader.rb
vagrant-config_builder-0.9.0 lib/config_builder/loader.rb
vagrant-config_builder-0.8.0 lib/config_builder/loader.rb
vagrant-config_builder-0.7.1 lib/config_builder/loader.rb
vagrant-config_builder-0.7.0 lib/config_builder/loader.rb
vagrant-config_builder-0.6.0 lib/config_builder/loader.rb
vagrant-config_builder-0.5.0 lib/config_builder/loader.rb
vagrant-config_builder-0.4.0 lib/config_builder/loader.rb
vagrant-config_builder-0.3.1 lib/config_builder/loader.rb
vagrant-config_builder-0.3.0 lib/config_builder/loader.rb
vagrant-config_builder-0.2.0 lib/config_builder/loader.rb
vagrant-config_builder-0.1.0 lib/config_builder/loader.rb