Class: Sonia::CLI

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

Instance Method Summary collapse

Instance Method Details

#consoleObject


19
20
21
22
23
24
25
# File 'lib/sonia/cli.rb', line 19

def console
  ARGV.pop # Remove console as parameter
  require 'irb'
  require 'irb/completion'
  require 'sonia'
  IRB.start(__FILE__)
end

#startObject


11
12
13
14
15
16
# File 'lib/sonia/cli.rb', line 11

def start
  require "sonia"
  Sonia::Server.run!(Config.new(options)) do
    Launchy.open(Sonia::Server.webserver_url) unless options[:'no-auto']
  end
end

#versionObject


28
29
30
31
# File 'lib/sonia/cli.rb', line 28

def version
  require 'sonia/version'
  puts "Sonia v#{Sonia::VERSION}"
end