Method: TTY::Reader::History#each

Defined in:
lib/tty/reader/history.rb

#each(&block) ⇒ Object

Iterates over history lines



81
82
83
84
85
86
87
# File 'lib/tty/reader/history.rb', line 81

def each(&block)
  if block_given?
    @history.each(&block)
  else
    @history.to_enum
  end
end