Module: Deep::Hash::Struct::PP::Dashboard::Table::Row
- Included in:
- Dashboard::Table::Row
- Defined in:
- lib/deep/hash/struct/pp/dashboard/table/row.rb
Instance Method Summary collapse
Instance Method Details
#inspect ⇒ Object
8 9 10 11 12 13 14 |
# 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) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 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 |