Sha256: bbddcc6d23bca9aa78cf89d6f5a6bef2e52297fb86d8b7de778ebce16f9dac2d
Contents?: true
Size: 650 Bytes
Versions: 8
Compression:
Stored size: 650 Bytes
Contents
module RubyToBlock module Block class HardwareButtonDownOrUp < Value include CharacterOperation include HardwareOperation blocknize '^\s*' + CHAR_RE + 'button\(' + DIO_PIN_RE + '\)\.(down|up)\?\s*$', value: true def self.process_match_data(md, context) md2 = regexp.match(md[type]) character = get_character(context, md2[1]) return false if context.receiver && context.receiver != character block = new(fields: { PIN: md2[2], DOU: md2[3] }) context.add_value(block) block.character = character true end end end end
Version data entries
8 entries across 8 versions & 1 rubygems