Class: Pippi::Checks::ReverseFollowedByEach::Documentation
- Inherits:
-
Object
- Object
- Pippi::Checks::ReverseFollowedByEach::Documentation
- Defined in:
- lib/pippi/checks/reverse_followed_by_each.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
37 38 39 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 37 def description "Don't use each followed by reverse; use reverse_each instead" end |
#instead_use ⇒ Object
45 46 47 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 45 def instead_use '[1,2,3].reverse_each {|x| x+1 }' end |
#sample ⇒ Object
41 42 43 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 41 def sample '[1,2,3].reverse.each {|x| x+1 }' end |