motion/util/constants.rb in bubble-wrap-1.9.5 vs motion/util/constants.rb in bubble-wrap-1.9.6

- old
+ new

@@ -22,10 +22,15 @@ # get("UIReturnKey", "done") => UIReturnKeyDone == 9 # get("UIReturnKey", 9) => 9 # get("UIImagePickerControllerSourceType", ["photo_library", "camera", "saved_photos_album"]) => 3 # get("UIActivityType", [:air_drop, :print]) => ["com.apple.UIKit.activity.AirDrop", "com.apple.UIKit.activity.Print"] def get(base, *values) - value = values.size == 1 ? values.first : values.flatten + if values.is_a? NSArray + value = values.size == 1 ? values.first : values.flatten + else + value = values + end + case value when Numeric value.to_i when NSArray unless get(base, value.first).is_a? Fixnum