Sha256: e124a41ec1e0df85f5732ba9baaff9ed1d4d052740968608200979109aaf6e01

Contents?: true

Size: 251 Bytes

Versions: 6

Compression:

Stored size: 251 Bytes

Contents

# frozen_string_literal: true

module Travis
  module Client
    module HasUuid
      def id?(object)
        object =~ /\A(?:\w+-){4}\w+\Z/ if object.is_a? String
      end

      def cast_id(object)
        object.to_str
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
travis-1.14.0 lib/travis/client/has_uuid.rb
travis-1.13.3 lib/travis/client/has_uuid.rb
travis-1.13.2 lib/travis/client/has_uuid.rb
travis-1.13.1 lib/travis/client/has_uuid.rb
travis-1.13.0 lib/travis/client/has_uuid.rb
travis-1.12.0 lib/travis/client/has_uuid.rb