class Janko::Flag
Attributes
value[R]
Public Class Methods
new(value)
click to toggle source
# File lib/janko/flag.rb, line 5 def initialize(value) @value = value end
Public Instance Methods
==(other)
click to toggle source
# File lib/janko/flag.rb, line 18 def ==(other) eql?(other) end
===(other)
click to toggle source
# File lib/janko/flag.rb, line 22 def ===(other) eql?(other) end
eql?(other)
click to toggle source
# File lib/janko/flag.rb, line 13 def eql?(other) return unless other.is_a?(self.class) (value & other.value) != 0 end
|(other)
click to toggle source
# File lib/janko/flag.rb, line 9 def |(other) self.class.new(value | other.value) end