Method: Querly::CLI::Rules#singleton
- Defined in:
- lib/querly/cli/rules.rb
#singleton(array) ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/querly/cli/rules.rb', line 66 def singleton(array) empty(array) do if array.length == 1 yield array.first else yield array.to_a end end end |