Class: HttpRouter::Route

### Home Classes Methods

### In Files

- lib/padrino-core/application/routing.rb

### Parent

Object

### Methods

- #after_filters
- #before_filters
- #custom_conditions
- #significant_variable_names
- #to

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Application
- Padrino::ApplicationLoadError
- Padrino::ApplicationSetupError
- Padrino::Cli
- Padrino::Cli::Adapter
- Padrino::Cli::Base
- Padrino::Erubis
- Padrino::Erubis::SafeBufferEnhancer
- Padrino::Erubis::SafeBufferTemplate
- Padrino::Erubis::Template
- Padrino::Filter
- Padrino::Flash
- Padrino::Flash::Helpers
- Padrino::Flash::Storage
- Padrino::Logger
- Padrino::Logger::Colorize
- Padrino::Logger::Extensions
- Padrino::Logger::Rack
- Padrino::Module
- Padrino::Mounter
- Padrino::Mounter::MounterException
- Padrino::Reloader
- Padrino::Reloader::Rack
- Padrino::Rendering
- Padrino::Rendering::ClassMethods
- Padrino::Rendering::InstanceMethods
- Padrino::Rendering::SafeTemplate
- Padrino::Rendering::TemplateNotFound
- Padrino::Router
- Padrino::Routing
- Padrino::Routing::ClassMethods
- Padrino::Routing::InstanceMethods
- Padrino::Routing::Parent
- Padrino::Routing::UnrecognizedException
- Padrino::Server
- Padrino::ShowExceptions
- Padrino::Tasks
- Padrino::Utils
- HttpRouter
- HttpRouter::Node
- HttpRouter::Node::Path
- HttpRouter::Request
- HttpRouter::Route
- Haml
- Haml::Helpers
- Haml::Util
- Sinatra
- Sinatra::Request
- Slim
- Slim::Template
- Tilt
- Tilt::HamlTemplate
- FileSet
- Kernel
- Module
- Object
- ObjectSpace
- PadrinoTasks
- String
- SupportLite

No matching classes.

# HttpRouter::Route

@private

### Attributes

action[RW]
cache[RW]
cache_expires_in[RW]
cache_key[RW]
controller[RW]
order[RW]
parent[RW]
use_layout[RW]

### Public Instance Methods

after_filters(&block) click to toggle source

    # File lib/padrino-core/application/routing.rb, line 78
    def after_filters(&block)
      @_after_filters ||= []
      @_after_filters << block if block_given?

      @_after_filters
    end

before_filters(&block) click to toggle source

    # File lib/padrino-core/application/routing.rb, line 71
    def before_filters(&block)
      @_before_filters ||= []
      @_before_filters << block if block_given?

      @_before_filters
    end

custom_conditions(&block) click to toggle source

    # File lib/padrino-core/application/routing.rb, line 85
    def custom_conditions(&block)
      @_custom_conditions ||= []
      @_custom_conditions << block if block_given?

      @_custom_conditions
    end

significant_variable_names() click to toggle source

    # File lib/padrino-core/application/routing.rb, line 92
    def significant_variable_names
      @significant_variable_names ||= if @original_path.is_a?(String)
        @original_path.scan(/(^|[^\\])[:\*]([a-zA-Z0-9_]+)/).map{|p| p.last.to_sym}
      elsif @original_path.is_a?(Regexp) and @original_path.respond_to?(:named_captures)
        @original_path.named_captures.keys.map(&:to_sym)
      else
        []
      end
    end

to(dest = nil, &dest_block) click to toggle source

    # File lib/padrino-core/application/routing.rb, line 102
    def to(dest = nil, &dest_block)
      @dest = dest || dest_block || raise("you didn't specify a destination")

      @router.current_order ||= 0
      @order = @router.current_order
      @router.current_order += 1

      if @dest.respond_to?(:url_mount=)
        urlmount = UrlMount.new(@path_for_generation, @default_values || {}) # TODO url mount should accept nil here.
        urlmount.url_mount = @router.url_mount if @router.url_mount
        @dest.url_mount = urlmount
      end
      self
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.