Class: Ronin::Recon::Values::EmailAddress
- Inherits:
 - 
      Ronin::Recon::Value
      
        
- Object
 - Ronin::Recon::Value
 - Ronin::Recon::Values::EmailAddress
 
 
- Defined in:
 - lib/ronin/recon/values/email_address.rb
 
Overview
Represents an email address.
Instance Attribute Summary collapse
- 
  
    
      #address  ⇒ String 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The email address.
 
Class Method Summary collapse
- 
  
    
      .value_type  ⇒ :email_address 
    
    
  
  
  
  
  
  
  
  private
  
    
Returns the type or kind of recon value.
 
Instance Method Summary collapse
- 
  
    
      #as_json  ⇒ Hash{Symbol => Object} 
    
    
  
  
  
  
  
  
  
  
  
    
Coerces the email address value into JSON.
 - 
  
    
      #eql?(other)  ⇒ Boolean 
    
    
      (also: #===)
    
  
  
  
  
  
  
  
  
  
    
Compares the value to another value.
 - 
  
    
      #hash  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    
The "hash" value for the email address.
 - 
  
    
      #initialize(address)  ⇒ EmailAddress 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Initializes the email address object.
 - 
  
    
      #to_s  ⇒ String 
    
    
      (also: #to_str)
    
  
  
  
  
  
  
  
  
  
    
Converts the email address object to a String.
 
Methods inherited from Ronin::Recon::Value
Constructor Details
#initialize(address) ⇒ EmailAddress
Initializes the email address object.
      44 45 46  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 44 def initialize(address) @address = address end  | 
  
Instance Attribute Details
#address ⇒ String (readonly)
The email address.
      36 37 38  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 36 def address @address end  | 
  
Class Method Details
.value_type ⇒ :email_address
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This is used internally to map a recon value class to a printable type.
Returns the type or kind of recon value.
      107 108 109  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 107 def self.value_type :email_address end  | 
  
Instance Method Details
#as_json ⇒ Hash{Symbol => Object}
Coerces the email address value into JSON.
      92 93 94  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 92 def as_json {type: :email_address, address: @address} end  | 
  
#eql?(other) ⇒ Boolean Also known as: ===
Compares the value to another value.
      58 59 60  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 58 def eql?(other) other.kind_of?(self.class) && @address == other.address end  | 
  
#hash ⇒ Integer
The "hash" value for the email address.
      70 71 72  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 70 def hash [self.class, @address].hash end  | 
  
#to_s ⇒ String Also known as: to_str
Converts the email address object to a String.
      80 81 82  | 
    
      # File 'lib/ronin/recon/values/email_address.rb', line 80 def to_s @address.to_s end  |