Class: LgPodPlugin::Ping
- Inherits:
-
Object
- Object
- LgPodPlugin::Ping
- Defined in:
- lib/lg_pod_plugin/net/net-ping.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#network_ok ⇒ Object
Returns the value of attribute network_ok.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(url) ⇒ Ping
constructor
A new instance of Ping.
Constructor Details
#initialize(url) ⇒ Ping
Returns a new instance of Ping.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/lg_pod_plugin/net/net-ping.rb', line 11 def initialize(url) uri = LURI.new(url) if uri.host self.uri = uri self.ip = uri.host self.network_ok = true else self.uri = nil self.ip = nil self.network_ok = false end end |
Instance Attribute Details
#ip ⇒ Object
Returns the value of attribute ip.
8 9 10 |
# File 'lib/lg_pod_plugin/net/net-ping.rb', line 8 def ip @ip end |
#network_ok ⇒ Object
Returns the value of attribute network_ok.
9 10 11 |
# File 'lib/lg_pod_plugin/net/net-ping.rb', line 9 def network_ok @network_ok end |
#uri ⇒ Object
Returns the value of attribute uri.
10 11 12 |
# File 'lib/lg_pod_plugin/net/net-ping.rb', line 10 def uri @uri end |