Class: OAI::MetadataFormat

Inherits:
Object
  • Object
show all
Includes:
XPath
Defined in:
lib/oai/client/metadata_format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XPath

#get_attribute, #xpath, #xpath_all, #xpath_first

Constructor Details

#initialize(element) ⇒ MetadataFormat

Returns a new instance of MetadataFormat.



6
7
8
9
10
# File 'lib/oai/client/metadata_format.rb', line 6

def initialize(element)
  @prefix = xpath(element, './/metadataPrefix')
  @schema = xpath(element, './/schema')
  @namespace = xpath(element, './/metadataNamespace')
end

Instance Attribute Details

#namespaceObject

Returns the value of attribute namespace.



4
5
6
# File 'lib/oai/client/metadata_format.rb', line 4

def namespace
  @namespace
end

#prefixObject

Returns the value of attribute prefix.



4
5
6
# File 'lib/oai/client/metadata_format.rb', line 4

def prefix
  @prefix
end

#schemaObject

Returns the value of attribute schema.



4
5
6
# File 'lib/oai/client/metadata_format.rb', line 4

def schema
  @schema
end