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.20.13 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.12 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.11 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.10 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.9 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.8 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.7 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.6 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.5 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.4 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.3 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.1 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.0 lib/sugarcube/to_s/uiview.rb
sugarcube-0.19.5 lib/sugarcube/to_s/uiview.rb
sugarcube-0.19.4 lib/sugarcube/to_s/uiview.rb
sugarcube-0.19.2 lib/sugarcube/to_s/uiview.rb
sugarcube-0.19.0 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.21 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.20 lib/sugarcube/to_s/uiview.rb
sugarcube-0.18.19 lib/sugarcube/to_s/uiview.rb