Class: Objectify::Rails::Routing::RouteSet

Inherits:
ActionDispatch::Routing::RouteSet
  • Object
show all
Defined in:
lib/objectify/rails/routing.rb

Instance Method Summary collapse

Instance Method Details

#draw(&block) ⇒ Object



115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/objectify/rails/routing.rb', line 115

def draw(&block)
  clear! unless @disable_clear_and_finalize

  mapper = Mapper.new(self)
  if block.arity == 1
    mapper.instance_exec(ActionDispatch::Routing::DeprecatedMapper.new(self), &block)
  else
    mapper.instance_exec(&block)
  end

  finalize! unless @disable_clear_and_finalize

  nil
end