Class: OAI::MetadataFormat
- Inherits:
-
Object
- Object
- OAI::MetadataFormat
- Includes:
- XPath
- Defined in:
- lib/oai/client/metadata_format.rb
Instance Attribute Summary collapse
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(element) ⇒ MetadataFormat
constructor
A new instance of MetadataFormat.
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
#namespace ⇒ Object
Returns the value of attribute namespace.
4 5 6 |
# File 'lib/oai/client/metadata_format.rb', line 4 def namespace @namespace end |
#prefix ⇒ Object
Returns the value of attribute prefix.
4 5 6 |
# File 'lib/oai/client/metadata_format.rb', line 4 def prefix @prefix end |
#schema ⇒ Object
Returns the value of attribute schema.
4 5 6 |
# File 'lib/oai/client/metadata_format.rb', line 4 def schema @schema end |