Class: ActionDispatch::Journey::Router::Strexp
- Inherits:
-
Object
- Object
- ActionDispatch::Journey::Router::Strexp
- Defined in:
- lib/action_dispatch/journey/router/strexp.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#anchor ⇒ Object
readonly
Returns the value of attribute anchor.
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#requirements ⇒ Object
readonly
Returns the value of attribute requirements.
-
#separators ⇒ Object
readonly
Returns the value of attribute separators.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ast, path, requirements, separators, anchor = true) ⇒ Strexp
constructor
A new instance of Strexp.
Constructor Details
#initialize(ast, path, requirements, separators, anchor = true) ⇒ Strexp
Returns a new instance of Strexp.
17 18 19 20 21 22 23 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 17 def initialize(ast, path, requirements, separators, anchor = true) @ast = ast @path = path @requirements = requirements @separators = separators @anchor = anchor end |
Instance Attribute Details
#anchor ⇒ Object (readonly)
Returns the value of attribute anchor.
9 10 11 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 9 def anchor @anchor end |
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
9 10 11 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 9 def ast @ast end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 9 def path @path end |
#requirements ⇒ Object (readonly)
Returns the value of attribute requirements.
9 10 11 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 9 def requirements @requirements end |
#separators ⇒ Object (readonly)
Returns the value of attribute separators.
9 10 11 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 9 def separators @separators end |
Class Method Details
.build(path, requirements, separators, anchor = true) ⇒ Object
11 12 13 14 15 |
# File 'lib/action_dispatch/journey/router/strexp.rb', line 11 def self.build(path, requirements, separators, anchor = true) parser = Journey::Parser.new ast = parser.parse path new ast, path, requirements, separators, anchor end |