class ProconBypassMan::Procon::UserOperation
Constants
- ASCII_ENCODING
- ZERO_BIT
Attributes
binary[R]
Public Class Methods
new(binary)
click to toggle source
# File lib/procon_bypass_man/procon/user_operation.rb, line 9 def initialize(binary) self.class.compile_if_not_compile_yet! unless binary.encoding.name == ASCII_ENCODING raise "おかしいです" end @binary = binary end
Public Instance Methods
binary=(binary)
click to toggle source
@depilicate
# File lib/procon_bypass_man/procon/user_operation.rb, line 21 def binary=(binary) unless binary.encoding.name == ASCII_ENCODING raise "おかしいです" end @binary = binary end
merge(target_binary: )
click to toggle source
# File lib/procon_bypass_man/procon/user_operation.rb, line 58 def merge(target_binary: ) tb = [target_binary].pack("H*") binary[3] = tb[3] binary[4] = tb[4] binary[5] = tb[5] binary[6] = tb[6] binary[7] = tb[7] binary[8] = tb[8] binary[9] = tb[9] binary[10] = tb[10] binary[11] = tb[11] self.binary end
set_no_action!()
click to toggle source
# File lib/procon_bypass_man/procon/user_operation.rb, line 28 def set_no_action! binary[3] = ZERO_BIT binary[4] = ZERO_BIT binary[5] = ZERO_BIT end