Class: PhisherPhinder::SimpleIp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ip_address:) ⇒ SimpleIp

Returns a new instance of SimpleIp.



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

def initialize(ip_address:)
  @ip_address = ip_address
end

Instance Attribute Details

#ip_addressObject (readonly)

Returns the value of attribute ip_address.



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

def ip_address
  @ip_address
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
# File 'lib/phisher_phinder/simple_ip.rb', line 11

def ==(other)
  other.is_a?(SimpleIp) && ip_address == other.ip_address
end

#to_sObject



15
16
17
# File 'lib/phisher_phinder/simple_ip.rb', line 15

def to_s
  @ip_address.to_s
end