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