lib/fasterer/offense.rb in fasterer-0.1.8 vs lib/fasterer/offense.rb in fasterer-0.1.9
- old
+ new
@@ -36,11 +36,11 @@
map_flatten_vs_flat_map:
'Array#map.flatten(1) is slower than Array#flat_map',
reverse_each_vs_reverse_each:
- 'Array#reverese.each is slower than Array#reverse_each',
+ 'Array#reverse.each is slower than Array#reverse_each',
select_first_vs_detect:
'Array#select.first is slower than Array#detect',
sort_vs_sort_by:
@@ -63,10 +63,16 @@
gsub_vs_tr:
'Using tr is faster than gsub when replacing a single character in a string with another single character',
select_last_vs_reverse_detect:
- 'Array#select.last is slower than Array#reverse.detect'
+ 'Array#select.last is slower than Array#reverse.detect',
+
+ getter_vs_attr_reader:
+ 'Use attr_reader for reading ivars',
+
+ setter_vs_attr_writer:
+ 'Use attr_writer for writing to ivars'
}
end
end