class FBomb::Campfire

Attributes

token[RW]

Public Class Methods

new(*args, &block) click to toggle source
# File lib/fbomb/campfire.rb, line 64
def Campfire.new(*args, &block)
  allocate.tap do |instance|
    instance.send(:initialize, *args, &block)
  end
end

Public Instance Methods

flow_for(name) click to toggle source
# File lib/fbomb/campfire.rb, line 70
def flow_for(name)
  name = name.to_s
  flow = flows.detect{|_| _.name == name}
  flow.extend(SearchExtension)
  flow.extend(UserExtension)
  flow.extend(StreamExtension)
  flow.extend(UrlExtension)
  flow.campfire = self
  flow
end
host() click to toggle source
# File lib/fbomb/campfire.rb, line 91
def host
  connection.raw_connection.host
end
scheme() click to toggle source
# File lib/fbomb/campfire.rb, line 95
def scheme
  connection.raw_connection.scheme
end
url() click to toggle source
# File lib/fbomb/campfire.rb, line 83
def url
  if token
    "#{ scheme }://#{ token }:X@#{ host }"
  else
    "#{ scheme }://#{ host }"
  end
end