Class: GFM::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/gfm/converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Converter

Returns a new instance of Converter.



6
7
8
# File 'lib/gfm/converter.rb', line 6

def initialize(filename)
  @input_file_name = filename
end

Instance Attribute Details

#input_file_nameObject (readonly)

Returns the value of attribute input_file_name.



3
4
5
# File 'lib/gfm/converter.rb', line 3

def input_file_name
  @input_file_name
end

#output_file_nameObject (readonly)

Returns the value of attribute output_file_name.



4
5
6
# File 'lib/gfm/converter.rb', line 4

def output_file_name
  @output_file_name
end

Instance Method Details

#write_output_file(filename = nil) ⇒ Object



10
11
12
13
# File 'lib/gfm/converter.rb', line 10

def write_output_file(filename = nil)
  @output_file_name = sanitized_output_file_name(filename)
  File.open(@output_file_name, 'w').write(html_content)
end