class Ravanello::Routing::Base

Base key routing class

Attributes

children[R]
parent[R]

Public Class Methods

new(parent = nil, &blk) click to toggle source
# File lib/ravanello/routing/base.rb, line 9
def initialize(parent = nil, &blk)
  @parent = parent
  @children = []
  instance_eval(&blk) if block_given?
end

Public Instance Methods

match(name, &blk) click to toggle source
# File lib/ravanello/routing/base.rb, line 15
def match(name, &blk)
  namespace = Ravanello::Routing::Match.new(name.to_s, self, &blk)
  children.push(namespace)
  namespace
end
routable?(*) click to toggle source
# File lib/ravanello/routing/base.rb, line 21
def routable?(*)
  raise StandardError, 'Not implemented'
end
route(*) click to toggle source
# File lib/ravanello/routing/base.rb, line 25
def route(*)
  raise StandardError, 'Not implemented'
end
to_s() click to toggle source
# File lib/ravanello/routing/base.rb, line 29
def to_s
  raise StandardError, 'Not implemented'
end