lib/fusuma/device.rb in fusuma-2.0.0.pre2 vs lib/fusuma/device.rb in fusuma-2.0.0
- old
+ new
@@ -34,12 +34,12 @@
class << self
# Return devices
# sort devices by capabilities of gesture
# @return [Array]
def all
- @all ||= fetch_devices.sort_by do |d|
- d.capabilities.match(/gesture/).to_s
- end
+ @all ||= fetch_devices.partition do |d|
+ d.capabilities.match?(/gesture/)
+ end.flatten
end
# @raise [SystemExit]
# @return [Array]
def available