Class: MetaCommit::Contracts::Ast
- Inherits:
-
Object
- Object
- MetaCommit::Contracts::Ast
- Defined in:
- lib/meta_commit_contracts/ast.rb
Overview
Structure which is returned by parser and can be traversed to collect children node information
Instance Attribute Summary collapse
-
#parser_class ⇒ Class
class which was used to parse this ast.
Instance Method Summary collapse
-
#children ⇒ Array<MetaCommit::Contracts::Ast>
Children ast.
-
#first_line ⇒ Integer?
Line number where ast starts.
-
#last_line ⇒ Integer?
Line number where ast ends.
Instance Attribute Details
#parser_class ⇒ Class
class which was used to parse this ast
4 5 6 |
# File 'lib/meta_commit_contracts/ast.rb', line 4 def parser_class @parser_class end |
Instance Method Details
#children ⇒ Array<MetaCommit::Contracts::Ast>
Returns children ast.
9 10 11 |
# File 'lib/meta_commit_contracts/ast.rb', line 9 def children end |
#first_line ⇒ Integer?
Returns line number where ast starts.
14 15 16 |
# File 'lib/meta_commit_contracts/ast.rb', line 14 def first_line end |
#last_line ⇒ Integer?
Returns line number where ast ends.
19 20 21 |
# File 'lib/meta_commit_contracts/ast.rb', line 19 def last_line end |