Class: Faml::CLI
- Inherits:
-
Thor
- Object
- Thor
- Faml::CLI
- Defined in:
- lib/faml/cli.rb
Instance Method Summary collapse
- #compile(file) ⇒ Object
- #render(file) ⇒ Object
- #stats(*paths) ⇒ Object
- #temple(file) ⇒ Object
- #version ⇒ Object
Instance Method Details
#compile(file) ⇒ Object
20 21 22 |
# File 'lib/faml/cli.rb', line 20 def compile(file) puts compile_file(file, format: [:format].to_sym, extend_helpers: [:extend_helpers]) end |
#render(file) ⇒ Object
12 13 14 15 |
# File 'lib/faml/cli.rb', line 12 def render(file) code = compile_file(file, format: [:format].to_sym, extend_helpers: [:extend_helpers]) puts instance_eval(code, file) end |
#stats(*paths) ⇒ Object
33 34 35 36 |
# File 'lib/faml/cli.rb', line 33 def stats(*paths) require_relative 'stats' Stats.new(*paths).report end |