Sha256: f32299d4ae65ddf135986e6a87d7cf308ec654b6a9e2c17a9bdd5d896b175eff

Contents?: true

Size: 188 Bytes

Versions: 34

Compression:

Stored size: 188 Bytes

Contents

class UILabel

  def 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

34 entries across 34 versions & 1 rubygems

Version Path
sugarcube-1.7.0 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.6.3 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.6.2 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.6.1 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.6.0 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.9 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.8 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.7 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.6 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.5 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.4 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.3 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.2 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.1 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.5.0 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.4.6 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.4.5 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.4.4 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.4.3 lib/sugarcube-to_s/uilabel.rb
sugarcube-1.4.2 lib/sugarcube-to_s/uilabel.rb