class Tynn::CLI
Constants
- USAGE
Attributes
template_path[R]
Public Class Methods
new()
click to toggle source
# File bin/tynn, line 15 def initialize @template_path = File.expand_path("..", __dir__) end
parse(args)
click to toggle source
# File bin/tynn, line 9 def self.parse(args) new.parse(args) end
Public Instance Methods
app_generator()
click to toggle source
# File bin/tynn, line 37 def app_generator return File.join(template_path, "app_generator") end
opts()
click to toggle source
# File bin/tynn, line 30 def opts return { "-h" => method(:usage), "--help" => method(:usage) } end
parse(args)
click to toggle source
# File bin/tynn, line 19 def parse(args) args = Clap.run(args, opts) usage if args.empty? require(app_generator) generator = AppGenerator.new(template_path, args) generator.setup end
usage()
click to toggle source
# File bin/tynn, line 49 def usage puts(USAGE); exit(0) end