Sha256: 8a242c7bf4fb65807787f5b0e6a836836eb131298feca640042bb28f941b246b

Contents?: true

Size: 618 Bytes

Versions: 9

Compression:

Stored size: 618 Bytes

Contents

module Hoth
  class Modules
    include Singleton

    attr_reader :service_modules

    def self.define(&block)
      instance.instance_eval(&block)
    end

    def self.module(module_name)
      instance.service_modules[module_name]
    end

    def self.service_modules
      instance.service_modules
    end
    
    def service_module(module_name, &block)
      service_module = ServiceModule.new(:name => module_name)
      service_module.instance_eval(&block)
      @service_modules[module_name] = service_module
    end
    
    private

      def initialize
        @service_modules = {}
      end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hoth-0.4.2 lib/hoth/modules.rb
hoth-0.4.1 lib/hoth/modules.rb
hoth-0.4.0 lib/hoth/modules.rb
hoth-0.3.4 lib/hoth/modules.rb
hoth-0.3.3 lib/hoth/modules.rb
hoth-0.3.2.beta4 lib/hoth/modules.rb
hoth-0.3.2.beta3 lib/hoth/modules.rb
hoth-0.3.2.beta2 lib/hoth/modules.rb
hoth-0.3.2.beta1 lib/hoth/modules.rb