Class: Range

Inherits:
Object show all
Defined in:
lib/pp.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#pretty_print(q) ⇒ Object

:nodoc:



490
491
492
493
494
495
496
497
498
# File 'lib/pp.rb', line 490

def pretty_print(q) # :nodoc:
  begin_nil = self.begin == nil
  end_nil = self.end == nil
  q.pp self.begin if !begin_nil || end_nil
  q.breakable ''
  q.text(self.exclude_end? ? '...' : '..')
  q.breakable ''
  q.pp self.end if !end_nil || begin_nil
end