Class: Jar
Instance Attribute Summary collapse
-
#bin ⇒ Object
Returns the value of attribute bin.
-
#name ⇒ Object
Returns the value of attribute name.
-
#with_manifest ⇒ Object
Returns the value of attribute with_manifest.
Attributes inherited from JavaTask
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(path) ⇒ Jar
constructor
A new instance of Jar.
Methods inherited from JavaTask
Constructor Details
#initialize(path) ⇒ Jar
Returns a new instance of Jar.
4 5 6 7 8 |
# File 'lib/jake/jar.rb', line 4 def initialize(path) @bin = [] @with_manifest = false super(path) end |
Instance Attribute Details
#bin ⇒ Object
Returns the value of attribute bin.
2 3 4 |
# File 'lib/jake/jar.rb', line 2 def bin @bin end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/jake/jar.rb', line 2 def name @name end |
#with_manifest ⇒ Object
Returns the value of attribute with_manifest.
2 3 4 |
# File 'lib/jake/jar.rb', line 2 def with_manifest @with_manifest end |
Instance Method Details
#command ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/jake/jar.rb', line 10 def command inputs = [] @bin.each do |c| inputs << "-C #{c} ." end if @with_manifest then "jar cvmf META-INF/MANIFEST.MF #{@name} #{inputs.join(' ')}" else "jar cvf #{@name} #{inputs.join(' ')}" end end |