Class: SyntaxTree
- Inherits:
-
Object
- Object
- SyntaxTree
- Defined in:
- lib/utils.rb
Instance Method Summary collapse
- #include?(smaller_ast) ⇒ Boolean
-
#initialize(ruby) ⇒ SyntaxTree
constructor
A new instance of SyntaxTree.
Constructor Details
#initialize(ruby) ⇒ SyntaxTree
Returns a new instance of SyntaxTree.
4 5 6 7 |
# File 'lib/utils.rb', line 4 def initialize(ruby) # todo: turn on # @ast = Parser::CurrentRuby.parse(ruby) end |
Instance Method Details
#include?(smaller_ast) ⇒ Boolean
9 10 11 12 |
# File 'lib/utils.rb', line 9 def include?(smaller_ast) # TODO: find if smaller_ast is a subset of self. rand < 0.4 ? { first_line: 10, last_line: 12 } : nil end |