@private
# File lib/padrino-core/application/routing.rb, line 78 def after_filters(&block) @_after_filters ||= [] @_after_filters << block if block_given? @_after_filters end
# File lib/padrino-core/application/routing.rb, line 71 def before_filters(&block) @_before_filters ||= [] @_before_filters << block if block_given? @_before_filters end
# File lib/padrino-core/application/routing.rb, line 85 def custom_conditions(&block) @_custom_conditions ||= [] @_custom_conditions << block if block_given? @_custom_conditions end
# 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
# 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
Generated with the Darkfish Rdoc Generator 2.