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-1.1.0 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.7 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.6 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.5 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.4 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.3 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.2 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.1 lib/sugarcube-to_s/uiview.rb
sugarcube-1.0.0 lib/sugarcube-to_s/uiview.rb
sugarcube-0.20.25 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.24 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.23 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.22 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.21 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.20 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.19 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.18 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.17 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.16 lib/sugarcube/to_s/uiview.rb
sugarcube-0.20.15 lib/sugarcube/to_s/uiview.rb