Class: SharedInfrastructure::Output
- Inherits:
-
File
- Object
- File
- SharedInfrastructure::Output
- Defined in:
- lib/shared_infrastructure/output.rb
Class Attribute Summary collapse
-
.root ⇒ Object
Returns the value of attribute root.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_name, *args) ⇒ Output
constructor
A new instance of Output.
Constructor Details
Class Attribute Details
.root ⇒ Object
Returns the value of attribute root.
48 49 50 |
# File 'lib/shared_infrastructure/output.rb', line 48 def root @root end |
Class Method Details
.fake_root(root = nil) ⇒ Object
Fake root. If block is given, change the root only for the duration of the block. If no block is given, is the same as configure.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/shared_infrastructure/output.rb', line 26 def fake_root(root = nil) if block_given? begin save_root = Output.root fake_root(root) result = yield ensure fake_root(save_root) result end else self.root = root end end |