Class: Campfire::PasteMessage

Inherits:
Message
  • Object
show all
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

Attributes inherited from Message

#body, #message_id, #person, #person_full_name, #timestamp, #type, #user

Instance Method Summary collapse

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

Returns the value of attribute link.



42
43
44
# File 'lib/campfire/message.rb', line 42

def link
  @link
end