lib/ios/sugarcube-to_s/uiview.rb in sugarcube-2.4.0 vs lib/ios/sugarcube-to_s/uiview.rb in sugarcube-2.4.1

- old
+ new

@@ -1,10 +1,21 @@ class UIView def sugarcube_to_s(options={}) suffix = '' - suffix += " stylename: #{self.stylename.inspect}" if self.respond_to?(:stylename) && self.stylename - suffix += " motion_kit_id: #{self.motion_kit_id.inspect}" if self.respond_to?(:motion_kit_id) && self.motion_kit_id + # teacup + if self.respond_to?(:stylename) && self.stylename && self.stylename.length > 0 + suffix += " stylename: #{self.stylename.inspect}" + end + # motionkit + if self.respond_to?(:motion_kit_ids) && self.motion_kit_ids && self.motion_kit_ids.length > 0 + if motion_kit_ids.length == 1 + suffix += " motion_kit_id: #{self.motion_kit_id.inspect}" + else + suffix += " motion_kit_ids: #{self.motion_kit_ids.inspect}" + end + end + # rmq? if options[:inner].is_a? Hash inner = '' options[:inner].each do |key, value| inner += ', ' if inner.length > 0