Sha256: f0c276885cc3da2671267427218fece5c6759e7145fca20555c32b83c58b3862

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

module Nmap
  class XML
    #
    # Wraps a `uptime` XML element.
    #
    # @since 1.0.0
    #
    class Uptime < Struct.new(:seconds, :last_boot)

      #
      # Converts the uptime object to a String.
      #
      # @return [String]
      #   The String form of the Uptime.
      #
      def to_s
        "uptime: #{self.seconds} (#{self.last_boot})"
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-nmap-1.0.3 lib/nmap/xml/uptime.rb