Class: Campfire::PasteMessage
- Defined in:
- lib/campfire/message.rb
Overview
a PasteMessage is sent when a paste block appears. #link contains the link to the full text of the pasted block (TODO: grab the full paste from the link and have it available)
Instance Attribute Summary collapse
-
#link ⇒ Object
Returns the value of attribute link.
Attributes inherited from Message
#body, #message_id, #person, #person_full_name, #timestamp, #type, #user
Instance Method Summary collapse
-
#initialize(params) ⇒ PasteMessage
constructor
A new instance of PasteMessage.
Constructor Details
#initialize(params) ⇒ PasteMessage
Returns a new instance of PasteMessage.
44 45 46 47 48 49 |
# File 'lib/campfire/message.rb', line 44 def initialize(params) super # FIXME: link is no longer available as a param. If we want the link, we # need to construct it from https://#{subdomain}.campfirenow.com/room/#{params[:room_id]}/paste/#{params[:id]} # self.link = params[:link] end |
Instance Attribute Details
#link ⇒ Object
Returns the value of attribute link.
42 43 44 |
# File 'lib/campfire/message.rb', line 42 def link @link end |