alma 0.2.8 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,33 +0,0 @@
1
- require 'ezwadl'
2
-
3
- module Alma
4
- module Api
5
-
6
-
7
- def default_params
8
- { :query => { :apikey => Alma.configuration.apikey } }
9
- end
10
-
11
- def query_merge(hash)
12
- {:query => default_params[:query].merge(hash)}
13
- end
14
-
15
- def resources
16
- @resources ||= load_wadl
17
- end
18
-
19
- def load_wadl(wadl_filename = nil)
20
- wadl_filename ||= set_wadl_filename
21
- parsed_wadl = EzWadl::Parser.parse(File.join(Alma::WADL_DIR, wadl_filename)) do |rs|
22
- rs.first.path = Alma.configuration.region
23
- end
24
- parsed_wadl.first
25
- end
26
-
27
- def set_wadl_filename
28
- # Each class including this module should define this
29
- raise NotImplementedError 'You must define the wadl_filename method'
30
- end
31
-
32
- end
33
- end