Sha256: 14813312a864028183aa7f0598ff47a21c452cb3890792f1bb73a2ec4557cab1

Contents?: true

Size: 554 Bytes

Versions: 7

Compression:

Stored size: 554 Bytes

Contents

module Vnstat
  class Result
    ##
    # A module that is included by result types that contain date information.
    module DateDelegation
      ##
      # The year the result was captured in.
      #
      # @return [Integer]
      def year
        date.year
      end

      ##
      # The month the result was captured in.
      #
      # @return [Integer]
      def month
        date.month
      end

      ##
      # The day the result was captured on.
      #
      # @return [Integer]
      def day
        date.day
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vnstat-ruby-1.1.0 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.5 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.4 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.3 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.2 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.1 lib/vnstat/result/date_delegation.rb
vnstat-ruby-1.0.0 lib/vnstat/result/date_delegation.rb