Class: Rdm::PackageParser
- Inherits:
-
Object
- Object
- Rdm::PackageParser
- Defined in:
- lib/rdm/package_parser.rb
Class Method Summary collapse
Class Method Details
.parse_file(package_path) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rdm/package_parser.rb', line 3 def parse_file(package_path) if File.directory?(package_path) package_path = File.join(package_path, Rdm::PACKAGE_FILENAME) end package_content = File.read(package_path) package = parse(package_content) package.path = File.dirname(package_path) package.source(source_path(package_path)) package end |