Class: HttpRouter::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def action
  @action
end

#cacheObject

Returns the value of attribute cache.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def cache
  @cache
end

#cache_expires_inObject

Returns the value of attribute cache_expires_in.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def cache_expires_in
  @cache_expires_in
end

#cache_keyObject

Returns the value of attribute cache_key.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def cache_key
  @cache_key
end

#controllerObject

Returns the value of attribute controller.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def controller
  @controller
end

#parentObject

Returns the value of attribute parent.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def parent
  @parent
end

#use_layoutObject

Returns the value of attribute use_layout.



69
70
71
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 69

def use_layout
  @use_layout
end

Instance Method Details

#after_filters(&block) ⇒ Object



78
79
80
81
82
83
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/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) ⇒ Object



71
72
73
74
75
76
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/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) ⇒ Object



85
86
87
88
89
90
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/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_namesObject



92
93
94
95
96
97
98
99
100
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/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