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