module TurboTest::StaticAnalysis::Constants::TokenMatcher
Private Instance Methods
const_class_or_module_eval?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 17 def const_class_or_module_eval?(token) token.last[0] == :@ident && %w[class_eval module_eval].include?(token.last[1]) && token[1][1][0] == :@const end
ident_class_or_module_eval?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 23 def ident_class_or_module_eval?(token) token.last[0] == :@ident && %w[class_eval module_eval].include?(token.last[1]) && token[1][1][0] == :@ident end
singleton_method_definition_with_constant?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 35 def singleton_method_definition_with_constant?(token) token[0] == :var_ref && token[1] && token[1][0] == :@const end
singleton_method_definition_with_self?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 29 def singleton_method_definition_with_self?(token) token[1] && token[1][0] == :@kw && token[1][1] == "self" end
top_const_ref?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 9 def top_const_ref?(token) token[0] == :top_const_ref end
var_ref?(token)
click to toggle source
# File lib/turbo_test_static_analysis/constants/token_matcher.rb, line 13 def var_ref?(token) token[0] == :var_ref end