Sha256: 8ee99e82c5c310809cb377bcced5468ffdd918e45e4aabfdf382f5ee83266887

Contents?: true

Size: 674 Bytes

Versions: 3

Compression:

Stored size: 674 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# 
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

class Wx::Enum

  def |(other)
    if other.instance_of?(self.class)
      self.class.new(to_i | other.to_i)
    else
      to_i | other.to_i
    end
  end

  def &(other)
    if other.instance_of?(self.class)
      self.class.new(to_i & other.to_i)
    else
      to_i & other.to_i
    end
  end

  def ~
    self.class.new(~self.to_i)
  end

  def !
    self.to_i == 0
  end

  def hash
    @value.hash
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/core/enum.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/core/enum.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/core/enum.rb