Sha256: bd09dc13bce04757b3e5f513370011e3ecf3c34f430d18b4bd423a0f4fa1a80a

Contents?: true

Size: 523 Bytes

Versions: 3

Compression:

Stored size: 523 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

module Wx

  module RTC

    class RichTextCompositeObject

      # Overload to provide Enumerator without block
      wx_each_child = instance_method :each_child
      wx_redefine_method :each_child do |&block|
        if block
          wx_each_child.bind(self).call(&block)
        else
          ::Enumerator.new { |y| wx_each_child.bind(self).call { |rto| y << rto } }
        end
      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-1.4.2 lib/wx/rtc/rich_text_composite_object.rb
wxruby3-1.4.1 lib/wx/rtc/rich_text_composite_object.rb
wxruby3-1.4.0 lib/wx/rtc/rich_text_composite_object.rb