Class: Campfire::UploadMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/campfire/message.rb

Overview

an UploadMessage is sent when a user uploads a file. #link contains the link to the file

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) ⇒ UploadMessage

Returns a new instance of UploadMessage.



56
57
58
59
60
61
# File 'lib/campfire/message.rb', line 56

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]}/uploads/#{params[:id]}/#{params[:filename]} (?)
  # self.link = params[:link]
end

Instance Attribute Details

Returns the value of attribute link.



54
55
56
# File 'lib/campfire/message.rb', line 54

def link
  @link
end