Class: Rake::Delphi::AndroidManifestTask
- Defined in:
- lib/rake/delphi/androidmanifest.rb
Instance Attribute Summary collapse
-
#dccTask ⇒ Object
readonly
Returns the value of attribute dccTask.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Attributes inherited from Task
Instance Method Summary collapse
- #execute(args = nil) ⇒ Object
-
#initialize(name, application) ⇒ AndroidManifestTask
constructor
A new instance of AndroidManifestTask.
Methods inherited from Task
#execute_base, #initialize_base, #needed=, #needed?, #out, #reenable_chain, #shortname, #trace?
Constructor Details
#initialize(name, application) ⇒ AndroidManifestTask
Returns a new instance of AndroidManifestTask.
33 34 35 36 37 38 39 |
# File 'lib/rake/delphi/androidmanifest.rb', line 33 def initialize(name, application) super self.needed = false @template = 'AndroidManifest.erb' @output = 'AndroidManifest.xml' @template_obj = AndroidManifestInfo.new(self) end |
Instance Attribute Details
#dccTask ⇒ Object (readonly)
Returns the value of attribute dccTask.
31 32 33 |
# File 'lib/rake/delphi/androidmanifest.rb', line 31 def dccTask @dccTask end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
31 32 33 |
# File 'lib/rake/delphi/androidmanifest.rb', line 31 def output @output end |
Instance Method Details
#execute(args = nil) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/rake/delphi/androidmanifest.rb', line 41 def execute(args = nil) super paclientTaskName = name.gsub(/:manifest$/, '') @dccTask = application[paclientTaskName].dccTask ChDir.new(self, File.dirname(@dccTask.dpr)) do |dir| RakeFileUtils.verbose(Logger.debug?) do erb = ERB.new(IO.read(@template)) text = erb.result(@template_obj.get_binding) File.open(@output, 'w') do |f| f.write(text) end end end end |