Sha256: 9cbe5532a2347bf4c5192da53484b099df328e3dc570833afb6d8f41a0ca0a48

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 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
    define_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
    define_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
    define_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

7 entries across 7 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/rtc/richtext_buffer.rb