Class: UILabel

Inherits:
Object show all
Defined in:
lib/sugarcube/to_s/uilabel.rb

Instance Method Summary collapse

Instance Method Details

#to_s(options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/sugarcube/to_s/uilabel.rb', line 3

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