Sha256: cb8b213e8b5f262d28bd4184071072d4d8ecfdd2d4ccc3bfc8e9def304fb068f

Contents?: true

Size: 643 Bytes

Versions: 3

Compression:

Stored size: 643 Bytes

Contents

class UIView

  def to_s(options={})
    options[:superview] = true if options[:superview].nil?
    if self.respond_to? :stylename and self.stylename
      suffix = ' stylename: ' + self.stylename.inspect
    else
      suffix = ''
    end
    "#{self.class.name}(##{self.object_id.to_s(16)}, #{SugarCube::Adjust::format_frame(self.frame)}" +
                        (options[:inner] ? ', ' + options[:inner] : '') +
                        ')' +
                        (options[:superview] && self.superview ? ", child of #{self.superview.class.name}(##{self.superview.object_id.to_s(16)})" : '') +
                        suffix
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sugarcube-0.11.3 lib/sugarcube/to_s/uiview.rb
sugarcube-0.11.2 lib/sugarcube/to_s/uiview.rb
sugarcube-0.11.1 lib/sugarcube/to_s/uiview.rb