class Bit

Public Instance Methods

!() click to toggle source
# File lib/primitive_wrapper.rb, line 285
def !
  !@value
end
&(other) click to toggle source
# File lib/primitive_wrapper.rb, line 277
def &(other)
  @value & other.prim_value
end
^(other) click to toggle source
# File lib/primitive_wrapper.rb, line 281
def ^(other)
  @value ^ other.prim_value
end
to_i() click to toggle source
# File lib/primitive_wrapper.rb, line 288
def to_i
  @value ? 1:0
end
to_int() click to toggle source
# File lib/primitive_wrapper.rb, line 291
def to_int
  Int.new(@value ? 1:0)
end
valid_type(prm) click to toggle source
# File lib/primitive_wrapper.rb, line 266
def valid_type(prm)
  return true if prm.kind_of? TrueClass
  return true if prm.kind_of? FalseClass
  return true if prm.kind_of? NilClass
  return true if prm.kind_of? Bool
  false
end
|(other) click to toggle source
# File lib/primitive_wrapper.rb, line 273
def |(other)
  @value | other.prim_value
end