Class: Rex::Exploitation::Powershell::Param
- Inherits:
-
Object
- Object
- Rex::Exploitation::Powershell::Param
- Defined in:
- lib/rex/exploitation/powershell/param.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(klass, name) ⇒ Param
constructor
A new instance of Param.
-
#to_s ⇒ String
To String.
Constructor Details
#initialize(klass, name) ⇒ Param
Returns a new instance of Param.
8 9 10 11 |
# File 'lib/rex/exploitation/powershell/param.rb', line 8 def initialize(klass, name) @klass = klass.strip @name = name.strip.gsub(/\s|,/, '') end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
7 8 9 |
# File 'lib/rex/exploitation/powershell/param.rb', line 7 def klass @klass end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/rex/exploitation/powershell/param.rb', line 7 def name @name end |
Instance Method Details
#to_s ⇒ String
To String
17 18 19 |
# File 'lib/rex/exploitation/powershell/param.rb', line 17 def to_s "[#{klass}]$#{name}" end |