Module: Sinatra::CaboodleHelpers

Defined in:
lib/caboodle/helpers.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(arg) ⇒ Object



4
5
6
# File 'lib/caboodle/helpers.rb', line 4

def method_missing arg
  Caboodle::Layout[arg]
end

Instance Method Details

#titleObject



8
9
10
11
12
13
14
15
# File 'lib/caboodle/helpers.rb', line 8

def title
  if request.path_info == "/"
    "#{Caboodle::Site.title} | #{Caboodle::Site.description}"
  else
    t = Caboodle::Site.title
    t = "#{@title} | #{t}" if @title
  end
end