Class: Protobuf::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/protobuf/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



12
13
14
# File 'lib/protobuf/cli.rb', line 12

def mode
  @mode
end

#runnerObject

Returns the value of attribute runner.



12
13
14
# File 'lib/protobuf/cli.rb', line 12

def runner
  @runner
end

Instance Method Details

#start(app_file) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/protobuf/cli.rb', line 43

def start(app_file)
  debug_say('Configuring the rpc_server process')

  configure_logger
  configure_traps
  configure_runner_mode
  create_runner
  configure_process_name(app_file)
  configure_gc
  configure_deprecation_warnings

  require_application(app_file) unless exit_requested?
  start_server unless exit_requested?
rescue => e
  say_and_exit('ERROR: RPC Server failed to start.', e)
end

#versionObject



61
62
63
# File 'lib/protobuf/cli.rb', line 61

def version
  say("Ruby Protobuf v#{::Protobuf::VERSION}")
end