class Bool

Public Instance Methods

!() click to toggle source
# File lib/primitive_wrapper.rb, line 253
def !
  Bool.new(!@value)
end
&(other) click to toggle source
# File lib/primitive_wrapper.rb, line 245
def &(other)
  Bool.new(@value & other.prim_value)
end
^(other) click to toggle source
# File lib/primitive_wrapper.rb, line 249
def ^(other)
  Bool.new(@value ^ other.prim_value)
end
to_i() click to toggle source
# File lib/primitive_wrapper.rb, line 257
def to_i
  @value ? 1:0
end
to_int() click to toggle source
# File lib/primitive_wrapper.rb, line 260
def to_int
  Int.new(@value ? 1:0)
end
valid_type(prm) click to toggle source
# File lib/primitive_wrapper.rb, line 232
def valid_type(prm)
  return true if prm.kind_of? TrueClass
  return true if prm.kind_of? FalseClass
  return true if prm.kind_of? TrueW
  return true if prm.kind_of? FalseW
  return true if prm.kind_of? Bool
  false
end
|(other) click to toggle source
# File lib/primitive_wrapper.rb, line 241
def |(other)
  Bool.new(@value | other.prim_value)
end