Class: Penetration::Core
- Inherits:
-
Object
- Object
- Penetration::Core
- Defined in:
- lib/penetration.rb
Instance Method Summary collapse
-
#initialize(session, text = nil, &block) ⇒ Core
constructor
A new instance of Core.
- #method_missing(name, *rest) ⇒ Object
Constructor Details
permalink #initialize(session, text = nil, &block) ⇒ Core
Returns a new instance of Core.
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
permalink #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 |