Class: OAI::Header
Instance Attribute Summary collapse
-
#datestamp ⇒ Object
Returns the value of attribute datestamp.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#set_spec ⇒ Object
Returns the value of attribute set_spec.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #deleted? ⇒ Boolean
-
#initialize(element) ⇒ Header
constructor
A new instance of Header.
Methods included from XPath
#get_attribute, #xpath, #xpath_all, #xpath_first
Constructor Details
#initialize(element) ⇒ Header
Returns a new instance of Header.
6 7 8 9 10 11 |
# File 'lib/oai/client/header.rb', line 6 def initialize(element) @status = get_attribute(element, 'status') @identifier = xpath(element, './/identifier') @datestamp = xpath(element, './/datestamp') @set_spec = xpath_all(element, './/setSpec') end |
Instance Attribute Details
#datestamp ⇒ Object
Returns the value of attribute datestamp.
4 5 6 |
# File 'lib/oai/client/header.rb', line 4 def datestamp @datestamp end |
#identifier ⇒ Object
Returns the value of attribute identifier.
4 5 6 |
# File 'lib/oai/client/header.rb', line 4 def identifier @identifier end |
#set_spec ⇒ Object
Returns the value of attribute set_spec.
4 5 6 |
# File 'lib/oai/client/header.rb', line 4 def set_spec @set_spec end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/oai/client/header.rb', line 4 def status @status end |
Instance Method Details
#deleted? ⇒ Boolean
13 14 15 |
# File 'lib/oai/client/header.rb', line 13 def deleted? return true if @status.to_s == "deleted" end |