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
39 40 41 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 39 def description "Don't use reverse followed by each; use reverse_each instead" end |
#instead_use ⇒ Object
47 48 49 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 47 def instead_use '[1,2,3].reverse_each {|x| x+1 }' end |
#sample ⇒ Object
43 44 45 |
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 43 def sample '[1,2,3].reverse.each {|x| x+1 }' end |