Class: HonorCodes::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/honor_codes/cli.rb

Instance Method Summary collapse

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, options[:filename]
  puts %Q(License stored to: #{license_path})
  puts inspect license_path if options[: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