Module: Sinatra::Underway

Defined in:
lib/underway/sinatra.rb,
lib/underway/sinatra/app_info.rb

Defined Under Namespace

Modules: AppInfo

Instance Method Summary collapse

Instance Method Details

#debug_route(request) ⇒ Object



6
7
8
# File 'lib/underway/sinatra.rb', line 6

def debug_route(request)
  log(request.inspect)
end

#gh_api(*args) ⇒ Object



20
21
22
# File 'lib/underway/sinatra.rb', line 20

def gh_api(*args)
  ::Underway::Api.invoke(*args)
end

#log(message) ⇒ Object



14
15
16
17
18
# File 'lib/underway/sinatra.rb', line 14

def log(message)
  if verbose_logging?
    ::Underway::Settings.configuration.logger.info(message)
  end
end

#verbose_logging?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/underway/sinatra.rb', line 10

def verbose_logging?
  !!::Underway::Settings.configuration.verbose_logging
end