Class: BeLetItBe::Analyzer
- Inherits:
-
Object
- Object
- BeLetItBe::Analyzer
- Defined in:
- lib/be_let_it_be/analyzer.rb
Instance Method Summary collapse
- #find_lets ⇒ Object
-
#initialize(file) ⇒ Analyzer
constructor
A new instance of Analyzer.
Constructor Details
#initialize(file) ⇒ Analyzer
Returns a new instance of Analyzer.
7 8 9 10 |
# File 'lib/be_let_it_be/analyzer.rb', line 7 def initialize(file) file_path = file.respond_to?(:path) ? file.path : file @ast = Prism.parse_file(file_path).value end |
Instance Method Details
#find_lets ⇒ Object
12 13 14 |
# File 'lib/be_let_it_be/analyzer.rb', line 12 def find_lets traverse(@ast) end |