class Libis::Services::Oai::Query

Public Class Methods

new(options = {}) click to toggle source
# File lib/libis/services/oai.rb, line 13
def initialize(options = {})
  @options = options
  @options[:metadata_prefix] ||= 'oai_dc'
end

Public Instance Methods

[](key, value) click to toggle source
# File lib/libis/services/oai.rb, line 18
def [](key, value)
  @options[key] = value
end
to_hash() click to toggle source
# 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