Class: Pkgman::Descriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/pkgman/descriptor.rb

Defined Under Namespace

Classes: Wrapper

Instance Method Summary collapse

Constructor Details

#initialize(path = 'pkgman.yml') ⇒ Descriptor

Returns a new instance of Descriptor.



7
8
9
10
# File 'lib/pkgman/descriptor.rb', line 7

def initialize(path = 'pkgman.yml')
  @path = path
  @data = Wrapper.new.merge(YAML.load(File.read(File.expand_path(@path))))
end

Instance Method Details

#[](name) ⇒ Object



12
13
14
# File 'lib/pkgman/descriptor.rb', line 12

def [](name)
  @data[name]
end