Class: ActionController::Routing::Component
- Inherits:
-
Object
- Object
- ActionController::Routing::Component
show all
- Defined in:
- lib/action_controller/routing.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.new(string, *args) ⇒ Object
52
53
54
55
56
57
58
59
60
|
# File 'lib/action_controller/routing.rb', line 52
def self.new(string, *args)
return super(string, *args) unless self == Component
case string
when ':controller' then ControllerComponent.new(:controller, *args)
when /^:(\w+)$/ then DynamicComponent.new($1, *args)
when /^\*(\w+)$/ then PathComponent.new($1, *args)
else StaticComponent.new(string, *args)
end
end
|
Instance Method Details
#dynamic? ⇒ Boolean
47
|
# File 'lib/action_controller/routing.rb', line 47
def dynamic?() false end
|
50
|
# File 'lib/action_controller/routing.rb', line 50
def key() nil end
|
#optional? ⇒ Boolean
48
|
# File 'lib/action_controller/routing.rb', line 48
def optional?() false end
|