Class: Hako::CLI::Status
- Inherits:
-
Object
- Object
- Hako::CLI::Status
- Defined in:
- lib/hako/cli.rb
Instance Method Summary collapse
Instance Method Details
#parse!(argv) ⇒ Object
214 215 216 217 218 219 220 221 222 |
# File 'lib/hako/cli.rb', line 214 def parse!(argv) parser.parse!(argv) @yaml_path = argv.first if @yaml_path.nil? puts parser.help exit 1 end end |
#parser ⇒ Object
224 225 226 227 228 229 |
# File 'lib/hako/cli.rb', line 224 def parser @parser ||= OptionParser.new do |opts| opts. = 'hako status FILE' opts.version = VERSION end end |
#run(argv) ⇒ Object
207 208 209 210 211 212 |
# File 'lib/hako/cli.rb', line 207 def run(argv) parse!(argv) require 'hako/application' require 'hako/commander' Commander.new(Application.new(@yaml_path)).status end |