class OperateDo::Recorder

Public Class Methods

new() click to toggle source
# File lib/operate_do.rb, line 60
def initialize
  @operators = []
  @messages  = []
end

Public Instance Methods

current_operator() click to toggle source
# File lib/operate_do.rb, line 73
def current_operator
  @operators.last
end
flush_message!() click to toggle source
# File lib/operate_do.rb, line 81
def flush_message!
  OperateDo.current_logger.flush!(@messages)
  @messages.clear
end
pop_operator() click to toggle source
# File lib/operate_do.rb, line 69
def pop_operator
  @operators.pop
end
push_operator(operator) click to toggle source
# File lib/operate_do.rb, line 65
def push_operator(operator)
  @operators.push operator
end
write(message, operate_at = Time.now) click to toggle source
# File lib/operate_do.rb, line 77
def write(message, operate_at = Time.now)
  @messages << OperateDo::Message.new(current_operator, message, operate_at)
end