Class: Andrake::Manifest
- Inherits:
-
Object
- Object
- Andrake::Manifest
- Includes:
- Version
- Defined in:
- lib/andrake/manifest.rb
Defined Under Namespace
Modules: Version
Constant Summary collapse
- ManifestFile =
'AndroidManifest.xml'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xml) ⇒ Manifest
constructor
A new instance of Manifest.
- #save ⇒ Object
Methods included from Version
#bump_major, #bump_minor, #bump_patch, #update_version, #version
Constructor Details
#initialize(xml) ⇒ Manifest
Returns a new instance of Manifest.
11 12 13 |
# File 'lib/andrake/manifest.rb', line 11 def initialize(xml) @document = ::Nokogiri::XML(xml) end |
Class Method Details
.load ⇒ Object
8 |
# File 'lib/andrake/manifest.rb', line 8 def load ; new File.read(manifest_file) ; end |
.manifest_file ⇒ Object
7 |
# File 'lib/andrake/manifest.rb', line 7 def manifest_file ; ManifestFile ; end |
Instance Method Details
#save ⇒ Object
15 16 17 18 19 |
# File 'lib/andrake/manifest.rb', line 15 def save File.open(self.class.manifest_file, 'w') do |f| @document.write_xml_to f end end |