class Metasploit::Yard::Aruba::RvmEnv::Unset
Recognizes `unset`s of environment variables.
Constants
- REGEXP
Matches line with format `unset <name>`
Public Class Methods
parse(line)
click to toggle source
Parses lines of `rvm env` output into a {Prepend} if it matches {REGEXP}
@param line [String] a line of `rvm env` output. @return [Unset] if line contains `unset`. @return [nil] otherwise
# File lib/metasploit/yard/aruba/rvm_env/unset.rb, line 19 def self.parse(line) match = REGEXP.match(line) if match new( name: match[:name] ) end end
Public Instance Methods
change(options={})
click to toggle source
Unsets {Metasploit::Yard::Aruba::RvmEnv::Variable#name}.
@param options [Hash{Symbol => Object}] @option options [Metasploit::Yard::Aruba::RvmEnv::Unset] :from the old state of this variable @option options [Object] :world the cucumber world instance for the current scenario
# File lib/metasploit/yard/aruba/rvm_env/unset.rb, line 38 def change(options={}) options.assert_valid_keys(:from , :world) world = options.fetch(:world) world.unset_env(name) end