Sha256: 8ecebaf857f13ee50a5a0d66876ab2c192c847421a579fa9e64c056dc4e3ee4b

Contents?: true

Size: 520 Bytes

Versions: 56

Compression:

Stored size: 520 Bytes

Contents

require 'travis/client'

module Travis
  module Client
    class WeakEntity < Entity
      def self.weak?
        true
      end

      def self.id_field
        raise "weak entities do not have id fields"
      end

      def self.id?(object)
        object.nil?
      end

      def self.cast_id(object)
        return object if id? object
        raise "weak entities do not have id fields"
      end

      def missing?(attribute)
        false
      end

      def complete?
        true
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
travis-1.6.8.travis.447.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.446.6 lib/travis/client/weak_entity.rb
travis-1.6.7 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.445.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.443.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.442.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.441.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.434.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.431.6 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.428.9 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.427.9 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.426.8 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.425.8 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.422.4 lib/travis/client/weak_entity.rb
travis-1.6.7.travis.420.4 lib/travis/client/weak_entity.rb
travis-1.6.6 lib/travis/client/weak_entity.rb
travis-1.6.6.travis.419.4 lib/travis/client/weak_entity.rb
travis-1.6.6.travis.417.4 lib/travis/client/weak_entity.rb
travis-1.6.5 lib/travis/client/weak_entity.rb
travis-1.6.4.travis.414.4 lib/travis/client/weak_entity.rb