Class: Scopus::XMLResponse::XMLResponseGeneric
- Inherits:
-
Object
- Object
- Scopus::XMLResponse::XMLResponseGeneric
- Defined in:
- lib/scopus/xml_response.rb
Direct Known Subclasses
Abstractcitationsresponse, Abstractsretrievalresponse, Authorretrievalresponse, Authorretrievalresponselist, Searchresults, Serviceerror
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(xml) ⇒ XMLResponseGeneric
constructor
A new instance of XMLResponseGeneric.
-
#process ⇒ Object
Just put anything you want here.
- #process_path(x, path) ⇒ Object
Constructor Details
#initialize(xml) ⇒ XMLResponseGeneric
Returns a new instance of XMLResponseGeneric.
40 41 42 43 |
# File 'lib/scopus/xml_response.rb', line 40 def initialize(xml) @xml=xml process() end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
39 40 41 |
# File 'lib/scopus/xml_response.rb', line 39 def xml @xml end |
Instance Method Details
#process ⇒ Object
Just put anything you want here
45 46 |
# File 'lib/scopus/xml_response.rb', line 45 def process end |
#process_path(x, path) ⇒ Object
47 48 49 50 |
# File 'lib/scopus/xml_response.rb', line 47 def process_path(x, path) node=x.at_xpath(path) (node.nil?) ? nil : node.text end |