Class: HttpRouter::Route
- Inherits:
-
Object
- Object
- HttpRouter::Route
- Defined in:
- lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#cache_expires_in ⇒ Object
Returns the value of attribute cache_expires_in.
-
#cache_key ⇒ Object
Returns the value of attribute cache_key.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#use_layout ⇒ Object
Returns the value of attribute use_layout.
Instance Method Summary collapse
- #after_filters(&block) ⇒ Object
- #before_filters(&block) ⇒ Object
- #custom_conditions(&block) ⇒ Object
- #significant_variable_names ⇒ Object
Instance Attribute Details
#action ⇒ Object
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 |
#cache ⇒ Object
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_in ⇒ Object
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_key ⇒ Object
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 |
#controller ⇒ Object
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 |
#parent ⇒ Object
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_layout ⇒ Object
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_names ⇒ Object
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 |