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)



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

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



100
101
102
# File 'lib/backup/notifier/campfire.rb', line 100

def api_token
  @api_token
end

#room_idObject

Campfire account’s room id



108
109
110
# File 'lib/backup/notifier/campfire.rb', line 108

def room_id
  @room_id
end

#subdomainObject

Campfire account’s subdomain



104
105
106
# File 'lib/backup/notifier/campfire.rb', line 104

def subdomain
  @subdomain
end

Instance Method Details

#message(message) ⇒ Object

Wrapper method for the #send_message (private) method



121
122
123
# File 'lib/backup/notifier/campfire.rb', line 121

def message(message)
  send_message(message)
end