Class: Eye::Controller

Inherits:
Object
  • Object
show all
Includes:
Celluloid, Commands, Helpers, Load, SendCommand, ShowHistory, Status, Logger::Helpers
Defined in:
lib/eye/controller.rb

Defined Under Namespace

Modules: Commands, Helpers, Load, SendCommand, ShowHistory, Status

Instance Attribute Summary collapse

Attributes included from Logger::Helpers

#logger

Instance Method Summary collapse

Methods included from ShowHistory

#history_data, #history_string

Methods included from SendCommand

#break_chain, #match, #send_command, #signal

Methods included from Status

#info_data, #info_data_debug, #info_objects, #info_string, #info_string_debug, #info_string_short

Methods included from Commands

#command

Methods included from Helpers

#all_groups, #all_processes, #application_by_name, #group_by_name, #process_by_name, #set_proc_line, #short_tree

Methods included from Load

#check, #explain, #load

Methods included from Dsl::Validate

#validate

Constructor Details

#initializeController

Returns a new instance of Controller.



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/eye/controller.rb', line 34

def initialize
  @applications = []
  @current_config = Eye::Dsl.initial_config

  Eye.instance_variable_set(:@logger, Eye::Logger.new('eye'))
  @logger = Eye.logger 
  Celluloid::logger = Eye.logger

  Eye::SystemResources.setup
  
  info "starting #{Eye::ABOUT} (#{$$})"
end

Instance Attribute Details

#applicationsObject (readonly)

Returns the value of attribute applications.



32
33
34
# File 'lib/eye/controller.rb', line 32

def applications
  @applications
end

#current_configObject (readonly)

Returns the value of attribute current_config.



32
33
34
# File 'lib/eye/controller.rb', line 32

def current_config
  @current_config
end

Instance Method Details

#self_configObject



47
48
49
# File 'lib/eye/controller.rb', line 47

def self_config
  current_config[:config]
end