Sha256: 33b9f4f4c9c8b6c976452173f28b589125cbb28fdc8ae4f86aae7558b9500e34
Contents?: true
Size: 1.04 KB
Versions: 5
Compression:
Stored size: 1.04 KB
Contents
# Copyright (c) 2023 M.J.N. Corino, The Netherlands # # This software is released under the MIT license. class Wx::RTC::RichTextBuffer class << self wx_each_handler = instance_method :each_handler wx_redefine_method :each_handler do |&block| if block_given? wx_each_handler.bind(self).call(&block) else ::Enumerator.new { |y| wx_each_handler.bind(self).call { |h| y << h } } end end wx_each_field_type = instance_method :each_field_type wx_redefine_method :each_field_type do |&block| if block_given? wx_each_field_type.bind(self).call(&block) else ::Enumerator.new { |y| wx_each_field_type.bind(self).call { |ft| y << ft } } end end wx_each_drawing_handler = instance_method :each_drawing_handler wx_redefine_method :each_drawing_handler do |&block| if block_given? wx_each_drawing_handler.bind(self).call(&block) else ::Enumerator.new { |y| wx_each_drawing_handler.bind(self).call { |h| y << h } } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems