module Deep::Hash::Struct::PP::Dashboard::Table::Row

Public Instance Methods

inspect() click to toggle source
# File lib/deep/hash/struct/pp/dashboard/table/row.rb, line 8
def inspect
  attributes  = []
  attributes << "name=#{name}"   unless name.nil?
  attributes << "value=#{value}" unless value.nil?
  attributes = "#{attributes.size.zero? ? '' : ' '}#{attributes.join(' ')}"
  "#<#{self.class.name.split("::").last}#{attributes}>"
end
pretty_print(q) click to toggle source
# File lib/deep/hash/struct/pp/dashboard/table/row.rb, line 16
def pretty_print(q)
  q.group(2, "#(#{self.class.name}:#{sprintf("0x%x", object_id)} {", "})") do
    q.breakable

    q.group(2, ":opt => {", "}") do
      q.breakable
      q.seplist(opt) do |k, v|
        q.text ":#{k} => "
        q.pp v
      end
      q.breakable
    end

    q.breakable

    q.text ":name => "
    q.pp name

    q.breakable

    q.text ":value => "
    q.pp value

    q.breakable
  end
end