Class: Rex::Exploitation::Powershell::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/exploitation/powershell/param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#klassObject

Returns the value of attribute klass.



7
8
9
# File 'lib/rex/exploitation/powershell/param.rb', line 7

def klass
  @klass
end

#nameObject

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_sString

To String

Returns:

  • (String)

    Powershell param



17
18
19
# File 'lib/rex/exploitation/powershell/param.rb', line 17

def to_s
  "[#{klass}]$#{name}"
end