Module: Blueprints::Convertable

Defined in:
lib/blueprints/convertable.rb

Instance Method Summary collapse

Instance Method Details



17
18
19
# File 'lib/blueprints/convertable.rb', line 17

def banner_end
  "\n###\n" 
end


13
14
15
# File 'lib/blueprints/convertable.rb', line 13

def banner_start
  "### blueprints from #{@format}\n\n"
end

#persist(str) ⇒ Object



3
4
5
6
7
# File 'lib/blueprints/convertable.rb', line 3

def persist(str)
  File.open(@output_file, 'a+') do |f|
    f.write(str)
  end
end

#process!Object



9
10
11
# File 'lib/blueprints/convertable.rb', line 9

def process!
  persist "#{banner_start}#{convert}#{banner_end}"
end