Sha256: f94e892ca8ea15a157ecd37a3095acc755d8024d3266634f2a0718c358eb2ecc
Contents?: true
Size: 333 Bytes
Versions: 2
Compression:
Stored size: 333 Bytes
Contents
class ProconBypassMan::PressButtonAware def initialize(binary) @binary = binary end def pressing_button?(button) button_obj = ProconBypassMan::Procon::Button.new(button) @binary[ button_obj.byte_position ].unpack("H*").first.to_i(16).to_s(2).reverse[ button_obj.bit_position ] == '1' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
procon_bypass_man-0.1.16.1 | lib/procon_bypass_man/procon/press_button_aware.rb |
procon_bypass_man-0.1.16 | lib/procon_bypass_man/procon/press_button_aware.rb |