Class: Pippi::Checks::SelectFollowedBySelect::Documentation
- Inherits:
-
Object
- Object
- Pippi::Checks::SelectFollowedBySelect::Documentation
- Defined in:
- lib/pippi/checks/select_followed_by_select.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
15 16 17 |
# File 'lib/pippi/checks/select_followed_by_select.rb', line 15 def description "Don't use consecutive select blocks; use a single select instead" end |
#instead_use ⇒ Object
21 22 23 |
# File 'lib/pippi/checks/select_followed_by_select.rb', line 21 def instead_use "[1,2,3].select {|x| x > 2 }" end |
#sample ⇒ Object
18 19 20 |
# File 'lib/pippi/checks/select_followed_by_select.rb', line 18 def sample "[1,2,3].select {|x| x > 1 }.select {|x| x > 2 }" end |