Class: Hamlize::Converter
- Inherits:
-
Object
- Object
- Hamlize::Converter
- Defined in:
- lib/hamlize/converter.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Converter
constructor
A new instance of Converter.
- #start! ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Converter
Returns a new instance of Converter.
3 4 5 |
# File 'lib/hamlize/converter.rb', line 3 def initialize(opts={}) @opts = opts end |
Instance Method Details
#start! ⇒ Object
7 8 9 10 11 12 |
# File 'lib/hamlize/converter.rb', line 7 def start! Pathname.glob(haml).each do |path| destination(path).open("w+") { |f| f.write convert(path) } puts "[#{Time.now}] #{path} => #{destination(path)}" end end |