Class: InternetHakai::RevTimeRegister

Inherits:
TimeRegister show all
Defined in:
lib/internethakai/hakairev/time_register.rb

Constant Summary

Constants inherited from TimeRegister

TimeRegister::UNIQUE_BY_THREAD

Constants inherited from BaseHandler

BaseHandler::UNIQUE_BY_THREAD

Instance Method Summary collapse

Methods inherited from TimeRegister

#do_regist, #regist

Methods inherited from BaseHandler

clear, clearall, get_class, get_config, get_handler, get_instance, get_instance_thread, get_thread_id, #initialize, set_config, set_thread_id, unique_by_thread?

Constructor Details

This class inherits a constructor from InternetHakai::BaseHandler

Instance Method Details

#execObject



24
25
26
27
28
29
30
31
# File 'lib/internethakai/hakairev/time_register.rb', line 24

def exec
    @stack.each do |arg|
        do_regist(*arg)
    end
    @stack = []
    @cnt += 1
    next_record if @cnt == 10
end

#get_recordObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/internethakai/hakairev/time_register.rb', line 8

def get_record
    exec
    return @report if @reports.empty?
    next_record
    @reports.each do |r|
        @report += r
    end
    @reports = []
    @report
end

#next_recordObject



3
4
5
6
7
# File 'lib/internethakai/hakairev/time_register.rb', line 3

def next_record
    @reports << @report
    @report = ResponseRecord::new
    @cnt = 0
end

#on_createObject



18
19
20
21
22
23
# File 'lib/internethakai/hakairev/time_register.rb', line 18

def on_create
    @report = ResponseRecord::new
    @reports = []
    @stack = []
    @cnt = 0
end