Class: Campfiyah::Adapters::Adapter

Inherits:
Object
  • Object
show all
Defined in:
lib/campfiyah/adapters.rb

Direct Known Subclasses

HTTP, Memory

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subdomain, token) ⇒ Adapter

Returns a new instance of Adapter.



5
6
7
# File 'lib/campfiyah/adapters.rb', line 5

def initialize(subdomain, token)
  @subdomain, @token = subdomain, token
end

Instance Attribute Details

#subdomainObject

Returns the value of attribute subdomain.



4
5
6
# File 'lib/campfiyah/adapters.rb', line 4

def subdomain
  @subdomain
end

#tokenObject

Returns the value of attribute token.



4
5
6
# File 'lib/campfiyah/adapters.rb', line 4

def token
  @token
end

Instance Method Details

#message(room_id, message) ⇒ Object



13
14
15
# File 'lib/campfiyah/adapters.rb', line 13

def message(room_id, message)
  fail "Implement #message in your own adapter"
end

#roomsObject



9
10
11
# File 'lib/campfiyah/adapters.rb', line 9

def rooms
  fail "Implement #rooms in your own adapter"
end