Sha256: a9dce15a31ff4c3d4364c888c50252c222d7173fa7e1f8797d0564300dfffb9c

Contents?: true

Size: 585 Bytes

Versions: 7

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

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-3.0.7 lib/vnstat/result/date_delegation.rb
vnstat-ruby-3.0.6 lib/vnstat/result/date_delegation.rb
vnstat-ruby-3.0.5 lib/vnstat/result/date_delegation.rb
vnstat-ruby-3.0.4 lib/vnstat/result/date_delegation.rb
vnstat-ruby-3.0.2 lib/vnstat/result/date_delegation.rb
vnstat-ruby-3.0.0 lib/vnstat/result/date_delegation.rb
vnstat-ruby-2.0.0 lib/vnstat/result/date_delegation.rb