Class: Flexo::Client

Inherits:
Object
  • Object
show all
Includes:
Daemonize
Defined in:
lib/flexo/client.rb

Overview

This is the ‘main’ class of Flexo. The main file just creates an instance of this class, and then everything goes automatically. Additionally, it contains tons of convenience functions, so plugins don’t neccessarily have to do everything so complicated.

Constant Summary

Constants included from Daemonize

Daemonize::VERSION

Instance Method Summary collapse

Methods included from Daemonize

#daemonize, #safefork

Constructor Details

#initializeClient

Returns a new instance of Client.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/flexo/client.rb', line 16

def initialize
  @nickname = nil
  
  begin
    @manager = Flexo::Manager.instance
    @manager.setup
  rescue InvalidConfigurationException => e
    $stderr.puts "Invalid configuration from Flexo::Client"
    exit 1
  end
  
  daemonize
end