module Rb2HamlExporter
UNDER DEVELOPMENT!!
Public Class Methods
check_file(filename)
click to toggle source
# File lib/asker/formatter/rb2haml_formatter.rb, line 10 def self.check_file(filename) unless File.extname(filename).casecmp('.rb').zero? msg = "[ERROR] Rb2HamlExporter: File name error #{filename}" raise msg end unless File.exist? filename msg = "[ERROR] Rb2HamlExporter: File #{filename} not found!" raise msg end end
export(filename)
click to toggle source
# File lib/asker/formatter/rb2haml_formatter.rb, line 4 def self.export(filename) check_file filename rbcontent = File.read(filename) puts rbcontent end