class BeautifulUrl::App

Public Class Methods

[](i = '') click to toggle source
#

BeautifulUrl::App[]

#
# File lib/beautiful_url/www/app.rb, line 160
def self.[](i = '')
  new(i)
end
new( commandline_arguments = nil, run_already = true ) click to toggle source
#

initialize

#
Calls superclass method
# File lib/beautiful_url/www/app.rb, line 36
def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  super()
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end
start_sinatra_interface() click to toggle source
#

BeautifulUrl::App.start_sinatra_interface

#
# File lib/beautiful_url/www/app.rb, line 153
def self.start_sinatra_interface
  ::BeautifulUrl::App.run!
end

Public Instance Methods

commandline_arguments?() click to toggle source
#

commandline_arguments?

#
# File lib/beautiful_url/www/app.rb, line 73
def commandline_arguments?
  @commandline_arguments
end
html_title(this_title = 'Translate URLs') click to toggle source
#

html_title

#
# File lib/beautiful_url/www/app.rb, line 140
def html_title(this_title = 'Translate URLs')
  "<html><title>#{this_title}</title></html>"
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method
# File lib/beautiful_url/www/app.rb, line 51
def reset
  super()
  # ======================================================================= #
  # === @automatically_redirect_when_the_input_has_been_found
  #
  # If the next variable is set to true then we will automatically
  # redirect the visitor.
  # ======================================================================= #
  @automatically_redirect_when_the_input_has_been_found = false
end
run() click to toggle source
#

run (run tag)

#
# File lib/beautiful_url/www/app.rb, line 147
def run
end
set_commandline_arguments(i = '') click to toggle source
#

set_input

#
# File lib/beautiful_url/www/app.rb, line 65
def set_commandline_arguments(i = '')
  i = [i].flatten.compact
  @commandline_arguments = i
end