Sha256: 1c86375f067fadcdebdd705dd19f3afe4b0e2a54cb908bb57684a60422602560

Contents?: true

Size: 198 Bytes

Versions: 54

Compression:

Stored size: 198 Bytes

Contents

class UILabel

  def sugarcube_to_s(options={})
    text = self.text
    if text && text.length > 20
      text = text[0..20] + '...'
    end
    super options.merge(inner: {text: text})
  end

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
sugarcube-3.0.4 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-3.0.3 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-3.0.2 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-3.0.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-3.0.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.12.3 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.12.2 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.12.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.12.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.11.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.11.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.10.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.9.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.8.2 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.8.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.8.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.7.1 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.7.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.6.0 lib/ios/sugarcube-to_s/uilabel.rb
sugarcube-2.5.0 lib/ios/sugarcube-to_s/uilabel.rb