Sha256: 5c388558bf23cc07f8111ca00684d069d2bb6d393f89a76f4254d703ad5c994b

Contents?: true

Size: 688 Bytes

Versions: 14

Compression:

Stored size: 688 Bytes

Contents

# encoding: UTF-8

Dir.glob('./lib/definitions/*.rb') { |p| require p }
Dir.glob('./lib/builders/*.rb') { |p| require p }
require_relative './instances/service_instance.rb'
# require 'instances/service_instance'

module Factor
  module Connector
    class ServiceManager
      attr_accessor :definition

      def service(id, &block)
        @definition = Factor::Connector::ServiceBuilder.new(id, &block).build
      end

      def instance
        instance = Factor::Connector::ServiceInstance.new(definition: @definition)
        instance
      end

      def self.load(filename)
        dsl = new
        dsl.instance_eval(File.read(filename))
        dsl
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
factor-connector-api-0.0.14 ./lib/service_manager.rb
factor-connector-api-0.0.13 ./lib/service_manager.rb
factor-connector-api-0.0.12 ./lib/service_manager.rb
factor-connector-api-0.0.11 ./lib/service_manager.rb
factor-connector-api-0.0.10 ./lib/service_manager.rb
factor-connector-api-0.0.9 ./lib/service_manager.rb
factor-connector-api-0.0.8 ./lib/service_manager.rb
factor-connector-api-0.0.7 ./lib/service_manager.rb
factor-connector-api-0.0.6 ./lib/service_manager.rb
factor-connector-api-0.0.5 ./lib/service_manager.rb
factor-connector-api-0.0.4 ./lib/service_manager.rb
factor-connector-api-0.0.3 ./lib/service_manager.rb
factor-connector-api-0.0.2 ./lib/service_manager.rb
factor-connector-api-0.0.1 ./lib/service_manager.rb