abstract class Ameba::Rule::Performance::Base
- Ameba::Rule::Performance::Base
- Ameba::Rule::Base
- Reference
- Object
Overview
A general base class for performance rules.
Included Modules
- YAML::Serializable
- YAML::Serializable::Strict
Direct Known Subclasses
- Ameba::Rule::Performance::AnyAfterFilter
- Ameba::Rule::Performance::AnyInsteadOfEmpty
- Ameba::Rule::Performance::ChainedCallWithNoBang
- Ameba::Rule::Performance::CompactAfterMap
- Ameba::Rule::Performance::FirstLastAfterFilter
- Ameba::Rule::Performance::FlattenAfterMap
- Ameba::Rule::Performance::MapInsteadOfBlock
- Ameba::Rule::Performance::SizeAfterFilter
Defined in:
ameba/rule/performance/base.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
-
.new(config = nil)
A general base class for performance rules.
Instance Method Summary
-
#catch(source : Source)
A convenient addition to
#test
method that does the same but returns a passed insource
as an addition.
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
Instance Method Detail
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?