Sha256: f2fe3d1713a576d387c9a98cc62c037f914f3b97ecc544050563c70e7fa501bb

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

module VCR
  extend self

  # @return [String] the current VCR version.
  # @note This string also has singleton methods:
  #
  #   * `major` [Integer] The major version.
  #   * `minor` [Integer] The minor version.
  #   * `patch` [Integer] The patch version.
  #   * `parts` [Array<Integer>] List of the version parts.
  def version
    @version ||= begin
      string = +'6.2.0'

      def string.parts
        split('.').map { |p| p.to_i }
      end

      def string.major
        parts[0]
      end

      def string.minor
        parts[1]
      end

      def string.patch
        parts[2]
      end

      string.freeze
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vcr-6.2.0 lib/vcr/version.rb