Class: Cpi::Event
- Inherits:
-
Object
- Object
- Cpi::Event
- Defined in:
- lib/cpi/event.rb
Instance Method Summary collapse
- #event_type ⇒ Object
- #event_uid ⇒ Object
-
#initialize(xml) ⇒ Event
constructor
A new instance of Event.
- #source_tenant_uid ⇒ Object
Constructor Details
#initialize(xml) ⇒ Event
Returns a new instance of Event.
6 7 8 |
# File 'lib/cpi/event.rb', line 6 def initialize(xml) @xml_doc = parse_xml(xml) end |
Instance Method Details
#event_type ⇒ Object
10 11 12 |
# File 'lib/cpi/event.rb', line 10 def event_type @xml_doc.xpath('//header/event_type').text end |
#event_uid ⇒ Object
18 19 20 |
# File 'lib/cpi/event.rb', line 18 def event_uid nil_if_blank(@xml_doc.xpath('//header/event_uid').text) end |
#source_tenant_uid ⇒ Object
14 15 16 |
# File 'lib/cpi/event.rb', line 14 def source_tenant_uid @xml_doc.xpath('//header/source_tenant_uid').text end |