Class: FastHaml::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/fast_haml/cli.rb

Instance Method Summary collapse

Instance Method Details

#compile(file) ⇒ Object



12
13
14
# File 'lib/fast_haml/cli.rb', line 12

def compile(file)
  puts compile_file(file)
end

#parse(file) ⇒ Object



17
18
19
20
# File 'lib/fast_haml/cli.rb', line 17

def parse(file)
  require 'pp'
  pp parse_file(file)
end

#render(file) ⇒ Object



7
8
9
# File 'lib/fast_haml/cli.rb', line 7

def render(file)
  puts eval(compile_file(file))
end

#temple(file) ⇒ Object



23
24
25
26
# File 'lib/fast_haml/cli.rb', line 23

def temple(file)
  require 'pp'
  pp FastHaml::Compiler.new.call(parse_file(file))
end