Class: Nmap::Uptime
- Inherits:
-
Struct
- Object
- Struct
- Nmap::Uptime
- Defined in:
- lib/nmap/uptime.rb
Overview
Wraps a uptime
XML element.
Instance Attribute Summary collapse
-
#last_boot ⇒ Object
Returns the value of attribute last_boot.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
Instance Method Summary collapse
-
#to_s ⇒ String
Converts the uptime object to a String.
Instance Attribute Details
#last_boot ⇒ Object
Returns the value of attribute last_boot
7 8 9 |
# File 'lib/nmap/uptime.rb', line 7 def last_boot @last_boot end |
#seconds ⇒ Object
Returns the value of attribute seconds
7 8 9 |
# File 'lib/nmap/uptime.rb', line 7 def seconds @seconds end |
Instance Method Details
#to_s ⇒ String
Converts the uptime object to a String.
15 16 17 |
# File 'lib/nmap/uptime.rb', line 15 def to_s "uptime: #{self.seconds} (#{self.last_boot})" end |