Class: Set
- Defined in:
- lib/jinx/helpers/set.rb,
lib/jinx/helpers/pretty_print.rb
Instance Method Summary collapse
-
#pretty_print(q) ⇒ Object
Formats this set using Enumerable#pretty_print.
-
#pretty_print_cycle(q) ⇒ Object
The pp.rb default pretty printing method for general objects that are detected as part of a cycle.
Instance Method Details
#pretty_print(q) ⇒ Object
Formats this set using Enumerable#pretty_print.
196 197 198 199 200 |
# File 'lib/jinx/helpers/pretty_print.rb', line 196 def pretty_print(q) # mark this object as visited; this fragment is inferred from pp.rb and is necessary to detect a cycle Thread.current[:__inspect_key__] << __id__ to_a.pretty_print(q) end |
#pretty_print_cycle(q) ⇒ Object
The pp.rb default pretty printing method for general objects that are detected as part of a cycle.
203 204 205 |
# File 'lib/jinx/helpers/pretty_print.rb', line 203 def pretty_print_cycle(q) to_a.pretty_print_cycle(q) end |