Class: PhisherPhinder::ExtendedIp
- Inherits:
-
Object
- Object
- PhisherPhinder::ExtendedIp
- Defined in:
- lib/phisher_phinder/extended_ip.rb
Instance Attribute Summary collapse
-
#geoip_ip_data ⇒ Object
readonly
Returns the value of attribute geoip_ip_data.
-
#ip_address ⇒ Object
readonly
Returns the value of attribute ip_address.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(ip_address:, geoip_ip_data:) ⇒ ExtendedIp
constructor
A new instance of ExtendedIp.
- #to_s ⇒ Object
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_data ⇒ Object (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_address ⇒ Object (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_s ⇒ Object
16 17 18 |
# File 'lib/phisher_phinder/extended_ip.rb', line 16 def to_s @ip_address.to_s end |