Sha256: 599f5f427b1c056b9e253b63c6d8abc203593b982d51a71fa1e195b3e50f41c1

Contents?: true

Size: 316 Bytes

Versions: 13

Compression:

Stored size: 316 Bytes

Contents

class Cranium::SourceRegistry

  def initialize
    @sources = {}
  end



  def [](name)
    @sources[name] or raise "Undefined source '#{name}'"
  end



  def register_source(name, &block)
    source = Cranium::DSL::SourceDefinition.new name
    source.instance_eval &block
    @sources[name] = source
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cranium-0.8.1 lib/cranium/source_registry.rb
cranium-0.8 lib/cranium/source_registry.rb
cranium-0.7 lib/cranium/source_registry.rb
cranium-0.6.1 lib/cranium/source_registry.rb
cranium-0.5 lib/cranium/source_registry.rb
cranium-0.4.3 lib/cranium/source_registry.rb
cranium-0.4.2 lib/cranium/source_registry.rb
cranium-0.4.1 lib/cranium/source_registry.rb
cranium-0.4 lib/cranium/source_registry.rb
cranium-0.3.1 lib/cranium/source_registry.rb
cranium-0.3.0 lib/cranium/source_registry.rb
cranium-0.2.1 lib/cranium/source_registry.rb
cranium-0.2.0 lib/cranium/source_registry.rb