Class: Syntax::Command
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Syntax::Command
- Defined in:
- lib/silicon/routing/syntax/command.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/silicon/routing/syntax/command.rb', line 3 def name @name end |
Instance Method Details
#async? ⇒ Boolean
15 16 17 |
# File 'lib/silicon/routing/syntax/command.rb', line 15 def async? @is_async end |
#parallel? ⇒ Boolean
19 20 21 |
# File 'lib/silicon/routing/syntax/command.rb', line 19 def parallel? @is_parallel end |
#parse ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/silicon/routing/syntax/command.rb', line 5 def parse @is_async = text_value.start_with? '=*' @is_parallel = text_value.start_with? '=>' @is_sequential = text_value.start_with? '*>' @name = text_value.sub('*>', '').sub('=*', '').sub('=>', '') self end |
#sequential? ⇒ Boolean
23 24 25 |
# File 'lib/silicon/routing/syntax/command.rb', line 23 def sequential? @is_sequential end |