Class: Ronin::UI::Console::Context
- Inherits:
-
Object
- Object
- Ronin::UI::Console::Context
- Defined in:
- lib/ronin/ui/console/context.rb
Overview
Class Method Summary collapse
-
.const_missing(name) ⇒ Object
Catches missing constants and searches the Ronin namespace.
-
.inspect ⇒ String
Inspects the console.
-
.instance_variables=(variables) ⇒ Object
Populates the instance variables.
-
.new ⇒ Class<Context>
Creates a new Ronin::UI::Console context.
Class Method Details
.const_missing(name) ⇒ Object
Catches missing constants and searches the Ronin namespace.
55 56 57 |
# File 'lib/ronin/ui/console/context.rb', line 55 def self.const_missing(name) Ronin.send(:const_missing,name) end |
.inspect ⇒ String
Inspects the console.
81 82 83 84 85 86 87 88 89 |
# File 'lib/ronin/ui/console/context.rb', line 81 def inspect body = unless instance_variables.empty? ': ' << instance_variables.map { |name| "#{name}=#{instance_variable_get(name).inspect}" }.join(', ') end return "#<Ronin::UI::Console#{body}>" end |
.instance_variables=(variables) ⇒ Object
Populates the instance variables.
65 66 67 68 69 |
# File 'lib/ronin/ui/console/context.rb', line 65 def instance_variables=(variables) variables.each do |name,value| instance_variable_set("@#{name}".to_sym,value) end end |
.new ⇒ Class<Context>
Creates a new Ronin::UI::Console context.
34 35 36 |
# File 'lib/ronin/ui/console/context.rb', line 34 def self.new class << super; self; end end |