Class: HonorCodes::CLI
- Inherits:
-
Thor
- Object
- Thor
- HonorCodes::CLI
- Defined in:
- lib/honor_codes/cli.rb
Instance Method Summary collapse
- #generate_from(template_path) ⇒ Object
- #inspect(license_path = HonorCodes::LICENSE_NAME) ⇒ Object
- #template(*fields) ⇒ Object
Instance Method Details
#generate_from(template_path) ⇒ Object
17 18 19 20 21 |
# File 'lib/honor_codes/cli.rb', line 17 def generate_from(template_path) license_path = HonorCodes.generate template_path, [:filename] puts %Q(License stored to: #{license_path}) puts inspect license_path if [:print] end |
#inspect(license_path = HonorCodes::LICENSE_NAME) ⇒ Object
27 28 29 |
# File 'lib/honor_codes/cli.rb', line 27 def inspect(license_path=HonorCodes::LICENSE_NAME) puts HonorCodes.interpret license_path end |
#template(*fields) ⇒ Object
40 41 42 |
# File 'lib/honor_codes/cli.rb', line 40 def template(*fields) HonorCodes::Generators::Template.start fields end |