Module: Rb2HamlExporter
- Defined in:
- lib/asker/formatter/rb2haml_formatter.rb
Defined Under Namespace
Classes: Map
Class Method Summary collapse
Class Method Details
.check_file(filename) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/asker/formatter/rb2haml_formatter.rb', line 12 def self.check_file(filename) unless File.extname(filename).casecmp(".rb").zero? Logger.error "Rb2HamlExporter: File name error #{filename}" exit 1 end unless File.exist? filename Logger.error "Rb2HamlExporter: File #{filename} not found!" exit 1 end end |
.export(filename) ⇒ Object
6 7 8 9 10 |
# File 'lib/asker/formatter/rb2haml_formatter.rb', line 6 def self.export(filename) check_file filename rbcontent = File.read(filename) puts rbcontent end |