Class: Gryphon::Cli

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

Overview

Command line parsing and execution class

Constant Summary collapse

COMMANDS =
%w[
  build
  clean
  serve
].freeze

Instance Method Summary collapse

Instance Method Details

#runObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/gryphon/cli.rb', line 14

def run
  options = {
    compress: false,
    force: false,
    port: 8000,
    watch: false
  }

  parse!(options)
  execute(ARGV[0], options)
rescue Errors::GryphonError => e
  warn e.message
  exit false
end