Class: Irgat::Console

Inherits:
Irgat
  • Object
show all
Defined in:
lib/modules/console.rb

Overview

create the class, that extends the Module Irgat::Irgat class

Instance Attribute Summary collapse

Attributes inherited from Irgat

#action, #commands_launched, #config_module, #folders, #init_time, #log_process, #programs

Instance Method Summary collapse

Methods inherited from Irgat

#help, #load_config, #process

Methods included from Dependencies

#check_dependencies

Methods included from Execs

#execute_command, #exit_with_error

Methods included from Mail

#send_email

Methods included from Log

#log, #output_log, #report_to_email, #report_to_log

Methods included from Help

#show_help

Constructor Details

#initialize(args = []) ⇒ Console

Returns a new instance of Console.



22
23
24
25
26
27
28
29
30
# File 'lib/modules/console.rb', line 22

def initialize(args = [])
  # Create and irgat process
  irgat_process = Irgat.new()
  # Get config
  @config = irgat_process.config
  # load options for module
  @config_module = self.load_config

end

Instance Attribute Details

#configObject (readonly)

accesor to configs



20
21
22
# File 'lib/modules/console.rb', line 20

def config
  @config
end

Instance Method Details

#default(args = {}) ⇒ Object



32
33
34
35
36
37
# File 'lib/modules/console.rb', line 32

def default(args =  {})
  require 'irb'
  puts "\nLaunching irgat command line"
  puts "---------------------------"
  exec("irb -r #{IRGAT_ROOT}/lib/irgat.rb -r #{IRGAT_ROOT}/lib/irgat/console.rb -r irb/completion")
end