Class: Eye::Controller

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

Defined Under Namespace

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

Constant Summary

Constants included from Commands

Commands::NOT_IMPORTANT_COMMANDS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Options

#set_opt_http, #set_opt_logger, #set_opt_logger_level

Methods included from SendCommand

#match, #send_command, #signal, #user_command

Methods included from Status

#debug_data, #history_data, #info_data, #short_data

Methods included from Commands

#command

Methods included from Helpers

#all_groups, #all_processes, #application_by_name, #cache_str, #find_nearest_process, #group_by_name, #process_by_full_name, #process_by_name, #save_cache, #set_proc_line, #short_tree

Methods included from Load

#check, #explain, #load

Constructor Details

#initializeController

Returns a new instance of Controller.



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

def initialize
  @applications = []
  @current_config = Eye::Config.new

  Celluloid::logger = Eye::Logger.new('celluloid')
  Eye::SystemResources.cache

  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

#logger_tagObject



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

def logger_tag
  'Eye'
end

#settingsObject



44
45
46
# File 'lib/eye/controller.rb', line 44

def settings
  current_config.settings
end