Class: IsbmAdaptor::Message
- Inherits:
-
Object
- Object
- IsbmAdaptor::Message
- Defined in:
- lib/isbm_adaptor/message.rb
Instance Attribute Summary collapse
-
#content ⇒ Nokogiri::XML::Document
The XML content of the message.
-
#id ⇒ String
The id of the message.
-
#topics ⇒ Array<String>
Topics associated with the message.
Instance Method Summary collapse
-
#initialize(id, content, topics) ⇒ Message
constructor
Creates a new ISBM Message container.
Constructor Details
#initialize(id, content, topics) ⇒ Message
Creates a new ISBM Message container.
17 18 19 20 21 |
# File 'lib/isbm_adaptor/message.rb', line 17 def initialize(id, content, topics) @id = id @content = content @topics = [topics].flatten end |
Instance Attribute Details
#content ⇒ Nokogiri::XML::Document
Returns the XML content of the message.
7 8 9 |
# File 'lib/isbm_adaptor/message.rb', line 7 def content @content end |
#id ⇒ String
Returns the id of the message.
4 5 6 |
# File 'lib/isbm_adaptor/message.rb', line 4 def id @id end |
#topics ⇒ Array<String>
Returns topics associated with the message.
10 11 12 |
# File 'lib/isbm_adaptor/message.rb', line 10 def topics @topics end |