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)



123
124
125
126
127
# File 'lib/backup/notifier/campfire.rb', line 123

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



110
111
112
# File 'lib/backup/notifier/campfire.rb', line 110

def api_token
  @api_token
end

#room_idObject

Campfire account’s room id



118
119
120
# File 'lib/backup/notifier/campfire.rb', line 118

def room_id
  @room_id
end

#subdomainObject

Campfire account’s subdomain



114
115
116
# File 'lib/backup/notifier/campfire.rb', line 114

def subdomain
  @subdomain
end

Instance Method Details

#message(message) ⇒ Object

Wrapper method for the #send_message (private) method



131
132
133
# File 'lib/backup/notifier/campfire.rb', line 131

def message(message)
  send_message(message)
end