Sha256: 164e38840629488164255446528f0510dc2f5a90659dd23f246dfd3826306ba4

Contents?: true

Size: 696 Bytes

Versions: 10

Compression:

Stored size: 696 Bytes

Contents

module RubyToBlock
  module Block
    class HardwareSmalrubotV3LightSensorValue < Value
      include CharacterOperation

      # rubocop:disable LineLength
      blocknize '^\s*' + CHAR_RE +
                'smalrubot_v3\.' +
                'light_sensor\.value' +
                '\s*$',
                value: true
      # rubocop:enable LineLength

      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
        context.add_value(block)
        block.character = character

        true
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
smalruby-editor-0.2.4-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.4 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.3-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.3 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.2-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.2 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.1-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.1 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.0-x86-mingw32 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb
smalruby-editor-0.2.0 app/models/concerns/ruby_to_block/block/hardware_smalrubot_v3_light_sensor_value.rb