Sha256: 7fc86b1da19e8ce71052ca03745da06a8b750e7811e6d35c916c40058f5c69cb
Contents?: true
Size: 913 Bytes
Versions: 6
Compression:
Stored size: 913 Bytes
Contents
# -*- coding: utf-8 -*- module RubyToBlock module Block class HardwareNeoPixelSetRgb < CharacterMethodCall include HardwareOperation # rubocop:disable LineLength blocknize ['^\s*', CHAR_RE, 'neo_pixel', '\(', PWM_PIN_RE, '\)', '\.set\(color:', '\s*\[(\d+),\s*(\d+),\s*(\d+)\]\s*', '\)', '\s*$'].join(''), statement: true # rubocop:enable LineLength def self.process_match_data(md, context) md2 = regexp.match(md[type]) block = new(fields: { PIN: md2[2] }) add_character_method_call_block(context, md2[1], block, RED: md2[3], GREEN: md2[4], BLUE: md2[5]) true end end end end
Version data entries
6 entries across 6 versions & 1 rubygems