Class: Penetration::Core

Inherits:
Object
  • Object
show all
Defined in:
lib/penetration.rb

Instance Method Summary collapse

Constructor Details

#initialize(session, text = nil, &block) ⇒ Core

Returns a new instance of Core.

[View source]

41
42
43
44
45
46
# File 'lib/penetration.rb', line 41

def initialize(session, text = nil, &block)
  @session = session
  @caller = Caller.new(@session, :rough_penetration)
  @caller.add_raw(text) if text
  instance_eval(&block) if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *rest) ⇒ Object

[View source]

48
49
50
51
52
# File 'lib/penetration.rb', line 48

def method_missing(name, *rest)
  if Preset.find(name)
    @caller.add_preset([name, *rest].flatten)
  end
end