Sha256: 442e9d464c02ab461873b4853519c259bdf87201c449cc798383c3d3dd939fba

Contents?: true

Size: 861 Bytes

Versions: 71

Compression:

Stored size: 861 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
    if options[:inner].is_a? Hash
      inner = ''
      options[:inner].each do |key, value|
        inner += ', ' if inner.length > 0
        inner += "#{key}: #{value.inspect}"
      end
    else
      inner = options[:inner]
    end

    "#{self.class.name}(##{self.object_id.to_s(16)}, #{SugarCube::Adjust::format_frame(self.frame)}" +
                        (inner ? ', ' + inner : '') +
                        ')' +
                        (options[:superview] && self.superview ? ", child of #{self.superview.class.name}(##{self.superview.object_id.to_s(16)})" : '') +
                        suffix
  end

end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
sugarcube-0.18.18 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.17 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.16 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.12 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.11 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.10 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.9 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.8 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.7 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.6 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.5 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.4 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.3 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.2 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.1 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.0 lib/sugarcube/to_s/uiview.rb
sugarcube-0.16.9 lib/sugarcube/to_s/uiview.rb
sugarcube-0.16.5 lib/sugarcube/to_s/uiview.rb
sugarcube-0.16.2 lib/sugarcube/to_s/uiview.rb
sugarcube-0.16 lib/sugarcube/to_s/uiview.rb