Class: Puree::XMLExtractor::Resource
- Inherits:
-
Base
- Object
- Base
- Puree::XMLExtractor::Resource
show all
- Defined in:
- lib/puree/xml_extractor/resource.rb
Overview
Instance Method Summary
collapse
Methods inherited from Base
#xpath_query_for_multi_value, #xpath_query_for_single_value
Constructor Details
#initialize(xml) ⇒ Resource
Returns a new instance of Resource.
9
10
11
|
# File 'lib/puree/xml_extractor/resource.rb', line 9
def initialize(xml)
super
end
|
Instance Method Details
#created_at ⇒ Time?
24
25
26
27
|
# File 'lib/puree/xml_extractor/resource.rb', line 24
def created_at
xpath_result = xpath_query_for_single_value('/info/createdDate')
Time.parse xpath_result if xpath_result
end
|
#created_by ⇒ String?
19
20
21
|
# File 'lib/puree/xml_extractor/resource.rb', line 19
def created_by
xpath_query_for_single_value('/info/createdBy')
end
|
#id ⇒ String?
41
42
43
|
# File 'lib/puree/xml_extractor/resource.rb', line 41
def id
xpath_query_for_single_value '/@pureId'
end
|
14
15
16
|
# File 'lib/puree/xml_extractor/resource.rb', line 14
def model
combine_metadata
end
|
#modified_at ⇒ Time?
35
36
37
38
|
# File 'lib/puree/xml_extractor/resource.rb', line 35
def modified_at
xpath_result = xpath_query_for_single_value('/info/modifiedDate')
Time.parse xpath_result if xpath_result
end
|
#modified_by ⇒ String?
30
31
32
|
# File 'lib/puree/xml_extractor/resource.rb', line 30
def modified_by
xpath_query_for_single_value('/info/modifiedBy')
end
|
#previous_uuids ⇒ Array<String>
51
52
53
|
# File 'lib/puree/xml_extractor/resource.rb', line 51
def previous_uuids
xpath_query_for_multi_value '/info/previousUuids/previousUuid'
end
|
#uuid ⇒ String?
46
47
48
|
# File 'lib/puree/xml_extractor/resource.rb', line 46
def uuid
xpath_query_for_single_value '/@uuid'
end
|