Class: Howler::Message
- Inherits:
-
Object
- Object
- Howler::Message
- Defined in:
- lib/howler/message.rb
Defined Under Namespace
Classes: Error, Failed, Notify, Retry
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(message) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(message) ⇒ Message
Returns a new instance of Message.
5 6 7 8 9 10 11 12 13 |
# File 'lib/howler/message.rb', line 5 def initialize() raise ArgumentError, "A message requires a method" unless ['method'] @id = ['id'] @klass = Howler::Util.constantize(['class']) @method = ['method'].to_sym @args = ['args'] @created_at = ['created_at'] || Time.now.to_f end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/howler/message.rb', line 3 def args @args end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/howler/message.rb', line 3 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/howler/message.rb', line 3 def id @id end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/howler/message.rb', line 3 def klass @klass end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/howler/message.rb', line 3 def method @method end |