Class: Rex::Powershell::Param
- Inherits:
-
Object
- Object
- Rex::Powershell::Param
- Defined in:
- lib/rex/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.
7 8 9 10 |
# File 'lib/rex/powershell/param.rb', line 7 def initialize(klass, name) @klass = klass.strip @name = name.strip.gsub(/\s|,/, '') end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
6 7 8 |
# File 'lib/rex/powershell/param.rb', line 6 def klass @klass end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/rex/powershell/param.rb', line 6 def name @name end |
Instance Method Details
#to_s ⇒ String
To String
16 17 18 |
# File 'lib/rex/powershell/param.rb', line 16 def to_s "[#{klass}]$#{name}" end |