Sha256: 400503d911e57b6ce65d31558bca140353426f7fe136bfc93388bf2dd44c2b24
Contents?: true
Size: 482 Bytes
Versions: 69
Compression:
Stored size: 482 Bytes
Contents
# -*- coding: utf-8 -*- module RubyToBlock module Block class SensingHit < Value blocknize '^\s*hit\?\(([^)]+)\)\s*$', value: true def self.process_match_data(md, context) return false unless context.receiver md2 = regexp.match(md[type]) name = md2[1] name.strip! c = context.characters[name] return false unless c context.add_value(new(fields: { CHAR: name })) true end end end end
Version data entries
69 entries across 69 versions & 1 rubygems