Class: Scl::Control::Output
- Inherits:
-
Object
- Object
- Scl::Control::Output
- Defined in:
- lib/scl/control/output.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #file(path) ⇒ Object
-
#initialize(content, suffix) ⇒ Output
constructor
A new instance of Output.
Constructor Details
#initialize(content, suffix) ⇒ Output
Returns a new instance of Output.
5 6 7 |
# File 'lib/scl/control/output.rb', line 5 def initialize(content, suffix) @content, @suffix = content, suffix end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/scl/control/output.rb', line 4 def content @content end |
Instance Method Details
#file(path) ⇒ Object
9 10 11 |
# File 'lib/scl/control/output.rb', line 9 def file(path) File.join("#{path.gsub(%r(#{@suffix.gsub('.','\.')}$),'')}#{@suffix}") end |