Class: Scl::Control::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/scl/control/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (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