lib/code/object/boolean.rb in code-ruby-0.12.0 vs lib/code/object/boolean.rb in code-ruby-0.13.0

- old
+ new

@@ -5,17 +5,12 @@ class Boolean < ::Code::Object def initialize(*args, **_kargs, &_block) raw = args.first || Nothing.new raw = raw.raw if raw.is_a?(Object) @raw = !!raw - super end - def self.name - "Boolean" - end - def call(**args) operator = args.fetch(:operator, nil) arguments = args.fetch(:arguments, []) value = arguments.first&.value @@ -44,27 +39,11 @@ def code_bitwise_xor(value) Boolean.new(raw ^ value.raw) end - def inspect - to_s - end - - def succ - Boolean.new(!raw) - end - - def to_s - raw.to_s - end - def truthy? raw - end - - def as_json(...) - raw.as_json(...) end end end end