Class: PhisherPhinder::ExtendedIp

Inherits:
Object
  • Object
show all
Defined in:
lib/phisher_phinder/extended_ip.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ip_address:, geoip_ip_data:) ⇒ ExtendedIp

Returns a new instance of ExtendedIp.



7
8
9
10
# File 'lib/phisher_phinder/extended_ip.rb', line 7

def initialize(ip_address:, geoip_ip_data:)
  @ip_address = ip_address
  @geoip_ip_data = geoip_ip_data
end

Instance Attribute Details

#geoip_ip_dataObject (readonly)

Returns the value of attribute geoip_ip_data.



5
6
7
# File 'lib/phisher_phinder/extended_ip.rb', line 5

def geoip_ip_data
  @geoip_ip_data
end

#ip_addressObject (readonly)

Returns the value of attribute ip_address.



5
6
7
# File 'lib/phisher_phinder/extended_ip.rb', line 5

def ip_address
  @ip_address
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
# File 'lib/phisher_phinder/extended_ip.rb', line 12

def ==(other)
  other.instance_of?(self.class) && ip_address == other.ip_address && geoip_ip_data == other.geoip_ip_data
end

#to_sObject



16
17
18
# File 'lib/phisher_phinder/extended_ip.rb', line 16

def to_s
  @ip_address.to_s
end