Class: Pkgman::Descriptor
- Inherits:
-
Object
- Object
- Pkgman::Descriptor
- Defined in:
- lib/pkgman/descriptor.rb
Defined Under Namespace
Classes: Wrapper
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(path = 'pkgman.yml') ⇒ Descriptor
constructor
A new instance of Descriptor.
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.(@path)))) end |
Instance Method Details
#[](name) ⇒ Object
12 13 14 |
# File 'lib/pkgman/descriptor.rb', line 12 def [](name) @data[name] end |