Class: JsonApiClient::Implementation
- Inherits:
- 
      Object
      
        - Object
- JsonApiClient::Implementation
 
- Defined in:
- lib/json_api_client/implementation.rb
Instance Attribute Summary collapse
- 
  
    
      #meta  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute meta. 
- 
  
    
      #version  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute version. 
Instance Method Summary collapse
- 
  
    
      #initialize(data)  ⇒ Implementation 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Implementation. 
Constructor Details
#initialize(data) ⇒ Implementation
Returns a new instance of Implementation.
| 5 6 7 8 9 10 | # File 'lib/json_api_client/implementation.rb', line 5 def initialize(data) # If the version member is not present, clients should assume the server implements at least version 1.0 of the specification. @version = data.fetch("version", "1.0") @meta = MetaData.new(data.fetch("meta", {})) end | 
Instance Attribute Details
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
| 3 4 5 | # File 'lib/json_api_client/implementation.rb', line 3 def @meta end | 
#version ⇒ Object (readonly)
Returns the value of attribute version.
| 3 4 5 | # File 'lib/json_api_client/implementation.rb', line 3 def version @version end |