Class: Gloss::Writer
- Inherits:
-
Object
- Object
- Gloss::Writer
- Defined in:
- lib/gloss/writer.rb
Instance Method Summary collapse
-
#initialize(content, src_path, output = nil) ⇒ Writer
constructor
A new instance of Writer.
- #run ⇒ Object
Constructor Details
#initialize(content, src_path, output = nil) ⇒ Writer
Returns a new instance of Writer.
9 10 11 12 13 |
# File 'lib/gloss/writer.rb', line 9 def initialize(content, src_path, output = nil) @content = content @src_path = src_path @output = output end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/gloss/writer.rb', line 14 def run() write_to_output() { |otpt| sb = shebang (if sb otpt.puts(sb) end) otpt.puts(@content) } end |