Class: Nmap::XML::Uptime
- Inherits:
-
Struct
- Object
- Struct
- Nmap::XML::Uptime
- Defined in:
- lib/nmap/xml/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
10 11 12 |
# File 'lib/nmap/xml/uptime.rb', line 10 def last_boot @last_boot end |
#seconds ⇒ Object
Returns the value of attribute seconds
10 11 12 |
# File 'lib/nmap/xml/uptime.rb', line 10 def seconds @seconds end |
Instance Method Details
#to_s ⇒ String
Converts the uptime object to a String.
18 19 20 |
# File 'lib/nmap/xml/uptime.rb', line 18 def to_s "uptime: #{self.seconds} (#{self.last_boot})" end |