Class: Rake::Delphi::RCTask
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
Attributes inherited from Task
Instance Method Summary collapse
- #execute(args = nil) ⇒ Object
-
#initialize(name, app) ⇒ RCTask
constructor
A new instance of RCTask.
- #is_rc=(value) ⇒ Object
Methods inherited from Task
#execute_base, #initialize_base, #out, #shortname, #trace?
Constructor Details
#initialize(name, app) ⇒ RCTask
Returns a new instance of RCTask.
97 98 99 100 101 |
# File 'lib/rake/delphi/resources.rb', line 97 def initialize(name, app) super @output = nil @is_rc = false end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
96 97 98 |
# File 'lib/rake/delphi/resources.rb', line 96 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
96 97 98 |
# File 'lib/rake/delphi/resources.rb', line 96 def output @output end |
Instance Method Details
#execute(args = nil) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/rake/delphi/resources.rb', line 112 def execute(args=nil) v, path, tool = RCResourceCompiler.find(true) a = [] a << '/dRC' if @is_rc a |= ['/fo', Rake.quotepath('', output), '/r', Rake.quotepath('', input) ] opts = { :args => a } opts.merge!(args) cmd = ([Rake.quotepath('', tool)] | opts[:args]).join(' ') RakeFileUtils.verbose(trace?) do sh cmd end end |
#is_rc=(value) ⇒ Object
108 109 110 |
# File 'lib/rake/delphi/resources.rb', line 108 def is_rc=(value) @is_rc = ! value.to_s.empty? end |