Class: FirefoxZip::Parses::Manifest
- Inherits:
-
Object
- Object
- FirefoxZip::Parses::Manifest
- Defined in:
- lib/firefox_zip/parses/manifest.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#icons ⇒ Object
readonly
Returns the value of attribute icons.
-
#launch_path ⇒ Object
readonly
Returns the value of attribute launch_path.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(manifest_data) ⇒ Manifest
constructor
A new instance of Manifest.
Constructor Details
#initialize(manifest_data) ⇒ Manifest
Returns a new instance of Manifest.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/firefox_zip/parses/manifest.rb', line 8 def initialize(manifest_data) data = JSON.parse(manifest_data) @name = data['name'] @description = data['description'] @launch_path = data['launch_path'] @icons = data['icons'] @icon = data['icons']['16'] @type = data['type'] = data['permissions'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def description @description end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def icon @icon end |
#icons ⇒ Object (readonly)
Returns the value of attribute icons.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def icons @icons end |
#launch_path ⇒ Object (readonly)
Returns the value of attribute launch_path.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def launch_path @launch_path end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def name @name end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/firefox_zip/parses/manifest.rb', line 6 def type @type end |