struct Ameba::Rules::LiteralInInterpolation

Overview

A rule that disallows useless string interpolations that contain a literal value instead of a variable or function.

For example:

"Hello, #{:Ary}"
"The are #{4} cats"

Included Modules

Defined in:

ameba/rules/literal_in_interpolation.cr

Instance Method Summary

Instance methods inherited from module Ameba::AST::Util

literal?(node) literal?, string_literal?(node) string_literal?

Instance methods inherited from struct Ameba::Rule

catch(source : Source) catch, initialize initialize, name name, test(source : Source, node : Crystal::ASTNode)
test(source : Source)
test

Constructor methods inherited from struct Ameba::Rule

new new

Class methods inherited from struct Ameba::Rule

rules rules

Instance Method Detail

def test(source, node : Crystal::StringInterpolation) #

[View source]
def test(source) #

[View source]