Class: Wtapack::Packer
- Inherits:
-
Object
- Object
- Wtapack::Packer
- Defined in:
- lib/wtapack.rb
Instance Attribute Summary collapse
-
#bundleID ⇒ Object
Returns the value of attribute bundleID.
-
#displayName ⇒ Object
Returns the value of attribute displayName.
-
#extension_profiles ⇒ Object
Returns the value of attribute extension_profiles.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#sign ⇒ Object
Returns the value of attribute sign.
Instance Method Summary collapse
Instance Attribute Details
#bundleID ⇒ Object
Returns the value of attribute bundleID.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def bundleID @bundleID end |
#displayName ⇒ Object
Returns the value of attribute displayName.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def displayName @displayName end |
#extension_profiles ⇒ Object
Returns the value of attribute extension_profiles.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def extension_profiles @extension_profiles end |
#extensions ⇒ Object
Returns the value of attribute extensions.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def extensions @extensions end |
#input ⇒ Object
Returns the value of attribute input.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def output @output end |
#profile ⇒ Object
Returns the value of attribute profile.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def profile @profile end |
#sign ⇒ Object
Returns the value of attribute sign.
5 6 7 |
# File 'lib/wtapack.rb', line 5 def sign @sign end |
Instance Method Details
#pack ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/wtapack.rb', line 7 def pack argv = ["wtapack", "-profile", "#{self.profile}", "-sign", "#{self.sign}", "-input", "\"#{self.input}\"", "-output", "\"#{self.output}\"", "-bundleID", "#{self.bundleID}"] unless self.extensions.nil? extensions = ["-extensions"] extension_list = "" self.extensions.each do |ex| extension_list = extension_list + "\"#{ex}\"" + "," end argv = argv + extensions + [extension_list] end unless self.extension_profiles.nil? self.extension_profiles.each do |extension, profile| argv = argv + ["\"-#{extension}\"", "#{profile}"] end end unless self.displayName.nil? argv = argv + ["-displayName", "\"#{self.displayName}\""] end # if self.extensions.nil? # self.extensions = [] # end argc = argv.count Wtapack::native_pack(argc, argv) end |