Class: Metasploit::Yard::Aruba::RvmEnv::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/metasploit/yard/aruba/rvm_env/variable.rb

Overview

An environment variable in rvm env.

Direct Known Subclasses

Export, Unset

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Variable

Returns a new instance of Variable.

Parameters:

  • attributes (Hash{Symbol=>String}) (defaults to: {})

Options Hash (attributes):

  • :name (String) — default: see #name


19
20
21
22
23
# File 'lib/metasploit/yard/aruba/rvm_env/variable.rb', line 19

def initialize(attributes={})
  attributes.assert_valid_keys(:name)

  @name = attributes[:name]
end

Instance Attribute Details

#nameString

The name of variable being manipulated in rvm env

Returns:

  • (String)


11
12
13
# File 'lib/metasploit/yard/aruba/rvm_env/variable.rb', line 11

def name
  @name
end

Instance Method Details

#==(other) ⇒ true, false

This variable is the same class and has the same #name as other.

Returns:

  • (true)

    if other.class is Metasploit::Yard::Aruba::RvmEnv::Variable and other.name is #name.

  • (false)

    otherwise



29
30
31
# File 'lib/metasploit/yard/aruba/rvm_env/variable.rb', line 29

def ==(other)
  other.class == self.class && other.name == self.name
end