Class: OutThingy
- Inherits:
-
Object
- Object
- OutThingy
- Defined in:
- lib/conan/output.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(output_dir) ⇒ OutThingy
constructor
A new instance of OutThingy.
- #loadAppMetadataFromDeploymentIfExists(app, deploy) ⇒ Object
- #outputToFile(file, &block) ⇒ Object
Constructor Details
#initialize(output_dir) ⇒ OutThingy
Returns a new instance of OutThingy.
7 8 9 10 |
# File 'lib/conan/output.rb', line 7 def initialize(output_dir) @output_dir = output_dir @time = Time.new end |
Instance Attribute Details
#output_dir ⇒ Object
Returns the value of attribute output_dir.
5 6 7 |
# File 'lib/conan/output.rb', line 5 def output_dir @output_dir end |
#time ⇒ Object
Returns the value of attribute time.
5 6 7 |
# File 'lib/conan/output.rb', line 5 def time @time end |
Instance Method Details
#loadAppMetadataFromDeploymentIfExists(app, deploy) ⇒ Object
19 20 21 |
# File 'lib/conan/output.rb', line 19 def loadAppMetadataFromDeploymentIfExists(app, deploy) loadAppMetadataFromDeployment(app, deploy, true) end |
#outputToFile(file, &block) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/conan/output.rb', line 12 def outputToFile(file, &block) o = File.join(@output_dir, file) puts "Write: #{o}" FileUtils.mkdir_p File.dirname(o) File.open(o, 'w') { |f| yield f } end |