Sha256: fbe16ab53274cf1b3f41b72362665fc8a911d21ca4fee96b059736e2064e959f

Contents?: true

Size: 690 Bytes

Versions: 42

Compression:

Stored size: 690 Bytes

Contents

# -*- coding: utf-8 -*-
module RubyToBlock
  module Block
    class HardwareMotorDriver < CharacterMethodCall
      # rubocop:disable LineLength
      blocknize '^\s*' + CHAR_RE +
                'motor_driver\("(D(?:3|5|6|9|10|11))"\)\.(forward|backward|stop)\s*$',
                statement: true
      # rubocop:enable LineLength

      attr_accessor :method_name

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

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
smalruby-editor-0.4.1-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.4.2-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.4.2 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.4.1 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.4.0-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.4.0 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.5-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.5 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.4-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.4 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.3-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.3 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.2-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.2 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.1-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.1 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.0-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.3.0 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.2.7-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb
smalruby-editor-0.2.7 app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb