Class: Hippo::API::RouteSet

Inherits:
Object
  • Object
show all
Defined in:
lib/hippo/api/route_set.rb

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ RouteSet

Returns a new instance of RouteSet.


83
84
85
# File 'lib/hippo/api/route_set.rb', line 83

def initialize(root)
    @root = root
end

Instance Method Details

#draw(&block) ⇒ Object


87
88
89
# File 'lib/hippo/api/route_set.rb', line 87

def draw(&block)
    @root.instance_eval(&block)
end

#for_extension(ext_id, &block) ⇒ Object


91
92
93
94
# File 'lib/hippo/api/route_set.rb', line 91

def for_extension(ext_id, &block)
    routes = RoutingBlock.new(ext_id)
    routes.instance_eval(&block)
end