Class: Broadcast::Message::Simple
- Inherits:
-
Broadcast::Message
- Object
- Broadcast::Message
- Broadcast::Message::Simple
- Defined in:
- lib/broadcast/simple.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#subject ⇒ Object
Returns the value of attribute subject.
Attributes inherited from Broadcast::Message
Instance Method Summary collapse
Methods inherited from Broadcast::Message
Methods included from Publishable
Constructor Details
This class inherits a constructor from Broadcast::Message
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/broadcast/simple.rb', line 3 def body @body end |
#subject ⇒ Object
Returns the value of attribute subject.
3 4 5 |
# File 'lib/broadcast/simple.rb', line 3 def subject @subject end |
Instance Method Details
#publish(medium, medium_arguments = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/broadcast/simple.rb', line 13 def publish(medium, medium_arguments = {}) begin Broadcast::Medium.const_get(medium.to_s.downcase.capitalize).new(medium_arguments).publish(self) rescue Broadcast.logger.error "Publishing of #{self.class.name} to #{medium} failed:\n#{$!}" end end |