Class: PowerAssert::Parser::PrismParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/power_assert/parser.rb

Instance Method Summary collapse

Instance Method Details

#identsObject



197
198
199
200
201
202
203
204
# File 'lib/power_assert/parser.rb', line 197

def idents
  @idents ||=
    begin
      require 'prism'
      result = Prism.parse(@line_for_parsing, scopes: [@proc_local_variables.map(&:to_sym)])
      result.success? ? extract_idents(result.value) : []
    end
end