Class: CDMDEXER::OaiClient
- Inherits:
 - 
      Object
      
        
- Object
 - CDMDEXER::OaiClient
 
 
- Defined in:
 - lib/cdmdexer/oai_client.rb
 
Instance Attribute Summary collapse
- 
  
    
      #base_url  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute base_url.
 - 
  
    
      #client  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute client.
 
Instance Method Summary collapse
- 
  
    
      #initialize(base_url: '', client: HTTP)  ⇒ OaiClient 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of OaiClient.
 - #request(query) ⇒ Object
 
Constructor Details
#initialize(base_url: '', client: HTTP) ⇒ OaiClient
Returns a new instance of OaiClient.
      7 8 9 10  | 
    
      # File 'lib/cdmdexer/oai_client.rb', line 7 def initialize(base_url: '', client: HTTP) @base_url = base_url @client = client end  | 
  
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
      6 7 8  | 
    
      # File 'lib/cdmdexer/oai_client.rb', line 6 def base_url @base_url end  | 
  
#client ⇒ Object (readonly)
Returns the value of attribute client.
      6 7 8  | 
    
      # File 'lib/cdmdexer/oai_client.rb', line 6 def client @client end  | 
  
Instance Method Details
#request(query) ⇒ Object
      12 13 14  | 
    
      # File 'lib/cdmdexer/oai_client.rb', line 12 def request(query) hashify get("#{base_url}?#{query}") end  |