Class: Out

Inherits:
Object
  • Object
show all
Defined in:
lib/ro_commands/helpers/out.rb

Class Method Summary collapse

Class Method Details

.msgsObject



13
14
15
16
17
# File 'lib/ro_commands/helpers/out.rb', line 13

def msgs
  @msgs.flatten! if @msgs.respond_to?(:flatten!)
  @msgs = [] if @msgs and @msgs.length > 999
  @msgs ||= []
end

.out(msg) ⇒ Object



3
4
5
6
7
# File 'lib/ro_commands/helpers/out.rb', line 3

def out(msg)
  m = msg
  puts m
  msgs << m
end

.resetObject



9
10
11
# File 'lib/ro_commands/helpers/out.rb', line 9

def reset
  @msgs = []
end