Sha256: 2974871796854caaae3342faef841475e2e19164542795412fb03bc06f23b924

Contents?: true

Size: 760 Bytes

Versions: 24

Compression:

Stored size: 760 Bytes

Contents

module RubyToBlock
  module Block
    class HardwareSmalrubotDcMotorPowerRatio < Value
      include CharacterOperation
      include HardwareOperation

      blocknize ['^\s*',
                 CHAR_RE,
                 SMALRUBOT_RE, '\.',
                 LOR_RE, '_dc_motor_power_ratio',
                 '\s*$'].join(''),
                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: { LOR: md2[3] })
        block.smalrubot_name = md2[2]
        context.add_value(block)
        block.character = character

        true
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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