Class: WithEvents::Aws::Message
- Inherits:
-
Object
- Object
- WithEvents::Aws::Message
- Defined in:
- lib/with_events/aws/message.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#identifier ⇒ Object
(also: #id)
readonly
Returns the value of attribute identifier.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Message
constructor
A new instance of Message.
- #serialize ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Message
Returns a new instance of Message.
13 14 15 16 17 18 |
# File 'lib/with_events/aws/message.rb', line 13 def initialize( = {}) = .with_indifferent_access @event = [:event] @stream = [:stream] @identifier = [:identifier] end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
9 10 11 |
# File 'lib/with_events/aws/message.rb', line 9 def event @event end |
#identifier ⇒ Object (readonly) Also known as: id
Returns the value of attribute identifier.
9 10 11 |
# File 'lib/with_events/aws/message.rb', line 9 def identifier @identifier end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
9 10 11 |
# File 'lib/with_events/aws/message.rb', line 9 def stream @stream end |
Class Method Details
.from_sqs(options = {}) ⇒ Object
24 25 26 |
# File 'lib/with_events/aws/message.rb', line 24 def self.from_sqs( = {}) new(.deep_transform_keys { |key| key.to_s.underscore }) end |
Instance Method Details
#serialize ⇒ Object
20 21 22 |
# File 'lib/with_events/aws/message.rb', line 20 def serialize .deep_transform_keys { |key| key.to_s.camelize(:lower) } end |