+

+ + abstract class Ameba::Rule::Performance::Base + +

+ + + + + + + +

+ + + + Overview +

+ +

A general base class for performance rules.

+ + + + + +

+ + + + Included Modules +

+ + + + + + +

+ + + + Direct Known Subclasses +

+ + + + + + + +

+ + + + Defined in: +

+ + + + ameba/rule/performance/base.cr + + +
+ + + + + + +

+ + + + Constructors +

+ + + + + + +

+ + + + Instance Method Summary +

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

Instance methods inherited from class Ameba::Rule::Base

+ + + + ==(other) + ==, + + + + catch(source : Source) + catch, + + + + excluded?(source) + excluded?, + + + + group + group, + + + + hash + hash, + + + + name + name, + + + + special? + special?, + + + + test(source : Source, node : Crystal::ASTNode, *opts)
test(source : Source)
+ test
+ + + + + + + + + +

Class methods inherited from class Ameba::Rule::Base

+ + + + parsed_doc + parsed_doc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

+ + + + Constructor Detail +

+ +
+
+ + def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) + + # +
+ +
+
+ +
+
+ +
+
+ + def self.new(config = nil) + + # +
+ +
+ +

A general base class for performance rules.

+
+ +
+
+ + [View source] + +
+
+ + + + + + +

+ + + + Instance Method Detail +

+ +
+
+ + def catch(source : Source) + + # +
+ +
+ +
+ Description copied from class Ameba::Rule::Base +
+ +

A convenient addition to #test method that does the same +but returns a passed in source as an addition.

+ +
source = MyRule.new.catch(source)
+source.valid?
+
+ +
+
+ + [View source] + +
+
+ + + + + +