Class: InternetHakai::PipeTimeRegister
- Inherits:
-
TimeRegister
- Object
- BaseHandler
- TimeRegister
- InternetHakai::PipeTimeRegister
- Defined in:
- lib/internethakai/hakairev/time_register.rb
Constant Summary
Constants inherited from TimeRegister
TimeRegister::UNIQUE_BY_THREAD
Constants inherited from BaseHandler
Instance Attribute Summary collapse
-
#wpipe ⇒ Object
Returns the value of attribute wpipe.
Instance Method Summary collapse
Methods inherited from TimeRegister
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 Attribute Details
#wpipe ⇒ Object
Returns the value of attribute wpipe.
44 45 46 |
# File 'lib/internethakai/hakairev/time_register.rb', line 44 def wpipe @wpipe end |
Instance Method Details
#do_regist(name, time, response, error) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/internethakai/hakairev/time_register.rb', line 45 def do_regist name, time, response, error if response.nil? status = 0; size = 0 else status = response.status; size = response.body.size end @wpipe.write(['regist', name, time, status, size, error].join("\t")+"\n") end |
#get_record ⇒ Object
38 39 40 41 42 43 |
# File 'lib/internethakai/hakairev/time_register.rb', line 38 def get_record return @data if @data @wpipe.write("get\n") io = TimeRegistProcess::rpipe @data = Marshal::load(io) end |
#on_create ⇒ Object
34 35 36 37 |
# File 'lib/internethakai/hakairev/time_register.rb', line 34 def on_create super @wpipe = TimeRegistProcess::wpipe end |