class RBT::Sinatra

Constants

IS_ROEBE
#

IS_ROEBE

#
USE_THIS_PORT
#

USE_THIS_PORT

#

Public Class Methods

new() click to toggle source
#

initialize

#
Calls superclass method
# File lib/rbt/www/app.rb, line 54
def initialize
  super()
  reset
  if IS_ROEBE
    require 'open_in_browser'
    # ===================================================================== #
    # Tell us which port will be used:
    # ===================================================================== #
    target = "http://localhost:#{USE_THIS_PORT}/"
    e sfancy(target)
    Thread.new {
      sleep 1.0
      OpenInBrowser[target]
    }
  end
end

Public Instance Methods

reset() click to toggle source
#

reset

#
# File lib/rbt/www/app.rb, line 74
def reset
end
return_available_actions() click to toggle source
#

return_available_actions

#
# File lib/rbt/www/app.rb, line 97
def return_available_actions
  p('The following entry points are available:')+
  p(css_style: 'padding:10px; margin-left: 1em') {
    a('/view', content: '/view', css_style: :bold)+br  # /view
  }
end
return_main_index() click to toggle source
#

return_main_index

#
# File lib/rbt/www/app.rb, line 89
def return_main_index
  'This is the www-interface for the RBT project, using <b>sinatra</b>.'+
  return_available_actions
end