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