Class: Erlang::Map
- Inherits:
-
Hash
- Object
- Hash
- Erlang::Map
- Defined in:
- lib/erlang/map.rb
Instance Method Summary collapse
- #inspect ⇒ Object
- #original_to_s ⇒ Object
- #pretty_inspect ⇒ Object
- #pretty_print(q) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#inspect ⇒ Object
3 4 5 |
# File 'lib/erlang/map.rb', line 3 def inspect "#<#{self.class.name} \##{super}>" end |
#original_to_s ⇒ Object
26 |
# File 'lib/erlang/map.rb', line 26 alias_method :original_to_s, :to_s |
#pretty_inspect ⇒ Object
7 8 9 |
# File 'lib/erlang/map.rb', line 7 def pretty_inspect "#<#{self.class.name} #{super[0..-2]}>\n" end |
#pretty_print(q) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/erlang/map.rb', line 11 def pretty_print(q) q.group(1, '#{', '}') { q.seplist(self, nil, :each_pair) { |k, v| q.group { q.pp k q.text ' => ' q.group(1) { q.breakable '' q.pp v } } } } end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/erlang/map.rb', line 27 def to_s "\##{original_to_s}" end |