Sha256: a1748271fbe197fce6540985792eb7cf55d46ba3412b07cc13fc1db9cf315af4

Contents?: true

Size: 548 Bytes

Versions: 8

Compression:

Stored size: 548 Bytes

Contents

module RubyToBlock
  module Block
    class HardwareOnButtonDownOrUp < CharacterEvent
      include HardwareOperation

      blocknize '^\s*' + CHAR_RE +
                'on\(:button_(down|up),' + DIO_PIN_RE + '\)\s+' +
                'do\s*$',
                statement: true, indent: true

      def self.process_match_data(md, context)
        md2 = regexp.match(md[type])
        add_character_event_blocks(context, md2[1],
                                   new(fields: { PIN: md2[3], DOU: md2[2] }))
        true
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
smalruby-editor-0.1.24-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.24 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.23-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.23 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.22-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.22 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.21-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb
smalruby-editor-0.1.21 app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb