module Chatbox

Constants

VERSION

Public Instance Methods

configure() { |config| ... } click to toggle source
# File lib/chatbox.rb, line 12
def configure
  yield config
end
deliver_message!(args) click to toggle source
# File lib/chatbox.rb, line 21
def deliver_message!(args)
  args.merge! store: store
  Draft.new(args).deliver!
end
fetch_inbox_for(entity) click to toggle source
# File lib/chatbox.rb, line 26
def fetch_inbox_for(entity)
  Inbox.new entity: entity, store: store
end
fetch_outbox_for(entity) click to toggle source
# File lib/chatbox.rb, line 30
def fetch_outbox_for(entity)
  Outbox.new entity: entity, store: store
end
reset_config!() click to toggle source
# File lib/chatbox.rb, line 16
def reset_config!
  @config = nil
  @store = nil
end

Private Instance Methods

config() click to toggle source
# File lib/chatbox.rb, line 36
def config
  @config ||= Configuration.new
end
store() click to toggle source
# File lib/chatbox.rb, line 40
def store
  @store ||= config.store || MemoryStore.new
end