Class: Libis::Services::Oai::Query
- Inherits:
-
Object
- Object
- Libis::Services::Oai::Query
- Defined in:
- lib/libis/services/oai.rb
Instance Method Summary collapse
- #[](key, value) ⇒ Object
-
#initialize(options = {}) ⇒ Query
constructor
A new instance of Query.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Query
Returns a new instance of Query.
13 14 15 16 |
# File 'lib/libis/services/oai.rb', line 13 def initialize( = {}) @options = @options[:metadata_prefix] ||= 'oai_dc' end |
Instance Method Details
#[](key, value) ⇒ Object
18 19 20 |
# File 'lib/libis/services/oai.rb', line 18 def [](key, value) @options[key] = value end |
#to_hash ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/libis/services/oai.rb', line 22 def to_hash { from: @options[:from], until: @options[:until], metadata_prefix: @options[:metadata_prefix], set: @options[:set], resumption_token: @options[:token] || @options[:resumption_token] }.cleanup end |