Module: Ronin::Exploits::Mixins::HasTargets::ClassMethods
- Defined in:
- lib/ronin/exploits/mixins/has_targets.rb
Overview
Class methods for defining targets.
Instance Method Summary collapse
-
#target(**kwargs, &block) ⇒ Object
Adds a target to the exploit.
-
#targets ⇒ Array<Target>
The targets for the exploit.
Instance Method Details
#target(**kwargs, &block) ⇒ Object
Adds a target to the exploit.
105 106 107 |
# File 'lib/ronin/exploits/mixins/has_targets.rb', line 105 def target(**kwargs,&block) targets << Target.new(**kwargs,&block) end |
#targets ⇒ Array<Target>
The targets for the exploit.
68 69 70 71 72 73 74 |
# File 'lib/ronin/exploits/mixins/has_targets.rb', line 68 def targets @targets ||= if superclass.kind_of?(ClassMethods) superclass.targets.dup else [] end end |