Class: FirefoxZip::Parses::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/firefox_zip/parses/manifest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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']
  @permissions = data['permissions']
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def description
  @description
end

#iconObject (readonly)

Returns the value of attribute icon.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def icon
  @icon
end

#iconsObject (readonly)

Returns the value of attribute icons.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def icons
  @icons
end

#launch_pathObject (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

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def name
  @name
end

#permissionsObject (readonly)

Returns the value of attribute permissions.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def permissions
  @permissions
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/firefox_zip/parses/manifest.rb', line 6

def type
  @type
end