Class: Array
Instance Method Summary collapse
- #include?(*list) ⇒ Boolean
- #include_one?(*list) ⇒ Boolean
- #super_include? ⇒ Object
- #symbolize_hashes ⇒ Object
Instance Method Details
#include?(*list) ⇒ Boolean
5 6 7 |
# File 'lib/array.rb', line 5 def include?(*list) list.count == 1 ? super_include?(list.first) : ( self & list ).count == list.count end |
#include_one?(*list) ⇒ Boolean
9 10 11 |
# File 'lib/array.rb', line 9 def include_one?( *list ) (self & list).count > 0 end |
#super_include? ⇒ Object
2 |
# File 'lib/array.rb', line 2 alias :super_include? :include? |