Class: Backup::Notifier::Campfire::Room

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/notifier/campfire.rb

Overview

The Campfire::Room acts as a model for an actual room on the Campfire service. And it uses the Campfire::Interface’s (HTTParty) class methods to communicate based on the provided parameters (room_id, subdomain and api_token)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(room_id, subdomain, api_token) ⇒ Room

Instantiates a new Campfire::Room object and sets all the necessary arguments (@room_id, @subdomain, @api_token)



149
150
151
152
153
# File 'lib/backup/notifier/campfire.rb', line 149

def initialize(room_id, subdomain, api_token)
  @room_id   = room_id
  @subdomain = subdomain
  @api_token = api_token
end

Instance Attribute Details

#api_tokenObject

Campfire api authentication api_token



136
137
138
# File 'lib/backup/notifier/campfire.rb', line 136

def api_token
  @api_token
end

#room_idObject

Campfire account’s room id



144
145
146
# File 'lib/backup/notifier/campfire.rb', line 144

def room_id
  @room_id
end

#subdomainObject

Campfire account’s subdomain



140
141
142
# File 'lib/backup/notifier/campfire.rb', line 140

def subdomain
  @subdomain
end

Instance Method Details

#message(message) ⇒ Object

Wrapper method for the #send_message (private) method



157
158
159
# File 'lib/backup/notifier/campfire.rb', line 157

def message(message)
  send_message(message)
end