Class: Code::Object::Nothing

Inherits:
Code::Object show all
Defined in:
lib/code/object/nothing.rb

Instance Method Summary collapse

Methods inherited from Code::Object

#fetch

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



12
13
14
# File 'lib/code/object/nothing.rb', line 12

def ==(other)
  other.is_a?(::Code::Object::Nothing)
end

#hashObject



17
18
19
# File 'lib/code/object/nothing.rb', line 17

def hash
  [self.class, nil].hash
end

#inspectObject



8
9
10
# File 'lib/code/object/nothing.rb', line 8

def inspect
  "nothing"
end

#to_sObject



4
5
6
# File 'lib/code/object/nothing.rb', line 4

def to_s
  ""
end