Sha256: 80993040dc4bd80d5382153a3dd517e9fd6f468f55ecf49bc74d2680bda314f2

Contents?: true

Size: 1.02 KB

Versions: 16

Compression:

Stored size: 1.02 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

16 entries across 16 versions & 1 rubygems

Version Path
wxruby3-1.3.1 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.3.0 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.2.1 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.2.0 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.1.2 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.1.1 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.1.0 lib/wx/rtc/richtext_buffer.rb
wxruby3-1.0.1 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.8 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.7 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.5 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.4 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.3 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.2 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.1 lib/wx/rtc/richtext_buffer.rb
wxruby3-0.9.0 lib/wx/rtc/richtext_buffer.rb