Class: Thot::CLI
- Inherits:
-
Carioca::Container
- Object
- Carioca::Container
- Thot::CLI
- Defined in:
- lib/thot/cli.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(options:, template_file: nil) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(options:, template_file: nil) ⇒ CLI
Returns a new instance of CLI.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/thot/cli.rb', line 9 def initialize(options: , template_file: nil ) = output.level = ([:debug])? :debug : :info output.debug "Debugging mode activated" if [:debug] @template_file = template_file output.info "Assuming Environment : #{@options[:environment]}" if [:verbose] getting_data getting_content end |
Instance Method Details
#generate ⇒ Object
21 22 23 24 25 26 |
# File 'lib/thot/cli.rb', line 21 def generate template = Template::new(list_token: @data.keys, template_content: @content, strict: false) template.map @data output.info "Generating output" if [:verbose] puts template.output end |