Module: Florida::Router

Included in:
Application::Base
Defined in:
lib/florida/router.rb

Instance Method Summary collapse

Instance Method Details

#path(path, options = {}) ⇒ Object



2
3
4
5
# File 'lib/florida/router.rb', line 2

def path(path, options = {})
  @routings ||= {}
  @routings[path] = options
end

#routings(&block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/florida/router.rb', line 7

def routings(&block)
  if block_given?
    block.call
  else
    @routings
  end
end