Class: Travis::Client::WeakEntity
  
  
  
  Constant Summary
  
  Constants inherited
     from Entity
  Entity::MAP
  Instance Attribute Summary
  
  Attributes inherited from Entity
  #attributes, #curry, #id, #session
  
    
      Class Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #complete?, #missing?
  
  
  
  
  
  
  
  
  Methods inherited from Entity
  #[], #[]=, aka, #attribute_names, attributes, base_path, #cancelable?, #complete?, has, has_singleton, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, preloadable, preloadable?, relations, #relations, #reload, #restartable?, subclass_for, subclasses, time, #to_h, #update_attributes
  
    Class Method Details
    
      
  
  
    .cast_id(object)  ⇒ Object 
  
  
  
  
    | 
20
21
22
23 | # File 'lib/travis/client/weak_entity.rb', line 20
def self.cast_id(object)
  return object if id? object
  raise "weak entities do not have id fields"
end | 
 
    
      
  
  
    .id?(object)  ⇒ Boolean 
  
  
  
  
    | 
16
17
18 | # File 'lib/travis/client/weak_entity.rb', line 16
def self.id?(object)
  object.nil?
end | 
 
    
      
  
  
    .id_field  ⇒ Object 
  
  
  
  
    | 
12
13
14 | # File 'lib/travis/client/weak_entity.rb', line 12
def self.id_field
  raise "weak entities do not have id fields"
end | 
 
    
      
  
  
    .weak?  ⇒ Boolean 
  
  
  
  
    | 
8
9
10 | # File 'lib/travis/client/weak_entity.rb', line 8
def self.weak?
  true
end |