Class: Dumper::Utility::IP
- Inherits:
-
Object
- Object
- Dumper::Utility::IP
- Defined in:
- lib/dumper/utility.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#ipaddr ⇒ Object
readonly
Returns the value of attribute ipaddr.
Instance Method Summary collapse
- #disable_reverse_lookup ⇒ Object
-
#initialize(*args) ⇒ IP
constructor
A new instance of IP.
Constructor Details
Instance Attribute Details
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
7 8 9 |
# File 'lib/dumper/utility.rb', line 7 def ip @ip end |
#ipaddr ⇒ Object (readonly)
Returns the value of attribute ipaddr.
7 8 9 |
# File 'lib/dumper/utility.rb', line 7 def ipaddr @ipaddr end |
Instance Method Details
#disable_reverse_lookup ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/dumper/utility.rb', line 19 def disable_reverse_lookup orig = Socket.do_not_reverse_lookup Socket.do_not_reverse_lookup = true begin yield ensure Socket.do_not_reverse_lookup = orig end end |