Sha256: d787ac16ca00ac3ebe948660225e337a201beecbe3ae9db702d730afc3f877a6

Contents?: true

Size: 767 Bytes

Versions: 52

Compression:

Stored size: 767 Bytes

Contents

# -*- coding: utf-8 -*-
module RubyToBlock
  module Block
    class HardwareTwoWheelDriveCar < CharacterMethodCall
      # rubocop:disable LineLength
      blocknize '^\s*' + CHAR_RE + 'two_wheel_drive_car\("(D(?:[2-9]|10))"\)\.(forward|backward|turn_left|turn_right|stop)\s*$',
                statement: true
      # rubocop:enable LineLength

      attr_accessor :method_name

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

      def type
        "hardware_two_wheel_drive_car_#{method_name}"
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

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