Class: Licensor::CLI
- Inherits:
-
Thor
- Object
- Thor
- Licensor::CLI
- Defined in:
- lib/licensor/cli.rb
Instance Method Summary collapse
- #__print_supported_licenses ⇒ Object
- #__print_version ⇒ Object
- #create(license) ⇒ Object
-
#initialize(*args) ⇒ CLI
constructor
A new instance of CLI.
- #show(license) ⇒ Object
Constructor Details
Instance Method Details
#__print_supported_licenses ⇒ Object
32 33 34 |
# File 'lib/licensor/cli.rb', line 32 def __print_supported_licenses puts @template.licenses end |
#__print_version ⇒ Object
39 40 41 |
# File 'lib/licensor/cli.rb', line 39 def __print_version puts VERSION end |
#create(license) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/licensor/cli.rb', line 21 def create(license) filename = [:filename] || DefaultSetting.filename open(filename, "w") do |f| f.puts text(license) end end |
#show(license) ⇒ Object
15 16 17 |
# File 'lib/licensor/cli.rb', line 15 def show(license) puts text(license) end |