module Deep::Hash::Struct::PP::Dashboard::Table::Tr
Public Instance Methods
inspect()
click to toggle source
# File lib/deep/hash/struct/pp/dashboard/table/tr.rb, line 8 def inspect attributes = [] attributes << "header=#{header}" if header.present? attributes << "side=#{side}" if side.present? attributes << "body=#{body}" if body.size > 0 attributes << "options=#{options}" 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/tr.rb, line 18 def pretty_print(q) q.group(2, "#(#{self.class.name}:#{sprintf("0x%x", object_id)} {", "})") do q.breakable if header.present? q.text ":header => " q.pp header q.breakable end if side.present? q.text ":side => " q.pp side q.breakable end if body.size > 0 q.text ":body => " q.pp body q.breakable end q.group(2, ":options => {", "}") do q.breakable q.seplist(options) do |k, v| q.text ":#{k} => " q.pp v end q.breakable end q.breakable end end