Sha256: 46957cfc15ea06bd45477a4565380fcf856ad2a983c1b66b1306e861ff39d9b3

Contents?: true

Size: 507 Bytes

Versions: 3

Compression:

Stored size: 507 Bytes

Contents

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

module Wx

  module STC

    class StyledTextCtrl

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

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-1.4.2 lib/wx/stc/styled_text_ctrl.rb
wxruby3-1.4.1 lib/wx/stc/styled_text_ctrl.rb
wxruby3-1.4.0 lib/wx/stc/styled_text_ctrl.rb