Module: FlowChat

Defined in:
lib/flow_chat.rb,
lib/flow_chat/flow.rb,
lib/flow_chat/config.rb,
lib/flow_chat/prompt.rb,
lib/flow_chat/context.rb,
lib/flow_chat/version.rb,
lib/flow_chat/base_app.rb,
lib/flow_chat/http/app.rb,
lib/flow_chat/ussd/app.rb,
lib/flow_chat/interrupt.rb,
lib/flow_chat/whatsapp/app.rb,
lib/flow_chat/base_executor.rb,
lib/flow_chat/http/renderer.rb,
lib/flow_chat/ussd/renderer.rb,
lib/flow_chat/base_processor.rb,
lib/flow_chat/http/processor.rb,
lib/flow_chat/ussd/processor.rb,
lib/flow_chat/instrumentation.rb,
lib/flow_chat/whatsapp/client.rb,
lib/flow_chat/phone_number_util.rb,
lib/flow_chat/ussd/gateway/nalo.rb,
lib/flow_chat/whatsapp/renderer.rb,
lib/flow_chat/session/middleware.rb,
lib/flow_chat/ussd/gateway/nsano.rb,
lib/flow_chat/whatsapp/processor.rb,
lib/flow_chat/http/gateway/simple.rb,
lib/flow_chat/simulator/controller.rb,
lib/flow_chat/instrumentation/setup.rb,
lib/flow_chat/whatsapp/configuration.rb,
lib/flow_chat/http/middleware/executor.rb,
lib/flow_chat/ussd/middleware/executor.rb,
lib/flow_chat/whatsapp/send_job_support.rb,
lib/flow_chat/whatsapp/template_manager.rb,
lib/flow_chat/ussd/middleware/pagination.rb,
lib/flow_chat/whatsapp/gateway/cloud_api.rb,
lib/flow_chat/session/cache_session_store.rb,
lib/flow_chat/session/rails_session_store.rb,
lib/flow_chat/whatsapp/middleware/executor.rb,
lib/flow_chat/ussd/middleware/choice_mapper.rb,
lib/flow_chat/instrumentation/log_subscriber.rb,
lib/flow_chat/instrumentation/metrics_collector.rb

Defined Under Namespace

Modules: Config, Http, Instrumentation, Interrupt, PhoneNumberUtil, Session, Simulator, Ussd, Whatsapp Classes: BaseApp, BaseExecutor, BaseProcessor, Context, Flow, Prompt

Constant Summary collapse

VERSION =
"0.8.2"

Class Method Summary collapse

Class Method Details

.instrument(event_name, payload = {}, &block) ⇒ Object

Access to instrumentation



22
23
24
# File 'lib/flow_chat.rb', line 22

def self.instrument(event_name, payload = {}, &block)
  FlowChat::Instrumentation.instrument(event_name, payload, &block)
end

.loggerObject

Shorthand for accessing the logger throughout the application



109
110
111
# File 'lib/flow_chat/config.rb', line 109

def self.logger
  Config.logger
end

.metricsObject



26
27
28
# File 'lib/flow_chat.rb', line 26

def self.metrics
  FlowChat::Instrumentation::Setup.metrics_collector
end

.rootObject



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

def self.root
  Pathname.new __dir__
end

.setup_instrumentation!Object



17
18
19
# File 'lib/flow_chat.rb', line 17

def self.setup_instrumentation!
  FlowChat::Instrumentation::Setup.setup_instrumentation!
end