Module: Airship::Extensions::Padrino
- Included in:
- Attachment::Padrino::ClassMethods
- Defined in:
- lib/airship/extensions/padrino.rb
Constant Summary collapse
- ROUTE_PRIORITY =
Airship::Extensions::Padrino separates methods of Padrino::Routing to convenient size.
{:high => 0, :normal => 1, :low => 2}
Instance Method Summary collapse
Instance Method Details
#route(verb, path, *args, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/airship/extensions/padrino.rb', line 9 def route(verb, path, *args, &block) = (args) = () path, *[:with] = path if path.is_a?(Array) action = path path, name, route_parents, , = *parse_route(path, , verb) .reverse_merge!(@_conditions) if @_conditions block = generate_block(verb, path, , block) .merge!(name: name, route_options: , parents: route_parents, action: action) register_route(verb, path, args, , &block) end |