Class: McProtocolE::Frame3e::WaitSec
- Inherits:
-
Object
- Object
- McProtocolE::Frame3e::WaitSec
- Defined in:
- lib/mc_protocol_e/frame_3e/request.rb
Overview
This class shows waiting second for MC protocol.
Instance Method Summary collapse
-
#initialize(sec) ⇒ WaitSec
constructor
A new instance of WaitSec.
- #to_b ⇒ Object
Constructor Details
#initialize(sec) ⇒ WaitSec
81 82 83 |
# File 'lib/mc_protocol_e/frame_3e/request.rb', line 81 def initialize(sec) @sec = sec end |
Instance Method Details
#to_b ⇒ Object
85 86 87 88 89 90 |
# File 'lib/mc_protocol_e/frame_3e/request.rb', line 85 def to_b return @binary if @binary quarter_sec = (sec * 4).to_i @binary = [quarter_sec].pack("v") end |