Class: CDMBL::OaiClient

Inherits:
Object
  • Object
show all
Defined in:
lib/cdmbl/oai_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url: '', client: HTTP) ⇒ OaiClient

Returns a new instance of OaiClient.



7
8
9
10
# File 'lib/cdmbl/oai_client.rb', line 7

def initialize(base_url: '', client: HTTP)
  @base_url    = base_url
  @client = client
end

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



6
7
8
# File 'lib/cdmbl/oai_client.rb', line 6

def base_url
  @base_url
end

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/cdmbl/oai_client.rb', line 6

def client
  @client
end

Instance Method Details

#request(query) ⇒ Object



12
13
14
# File 'lib/cdmbl/oai_client.rb', line 12

def request(query)
  hashify get("#{base_url}?#{query}")
end