Class: Code::Object::Nothing

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Code::Object

#<=>, #==, #call, #falsy?, #hash

Constructor Details

#initializeNothing

Returns a new instance of Nothing.



6
7
8
# File 'lib/code/object/nothing.rb', line 6

def initialize
  @raw = nil
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



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

def raw
  @raw
end

Instance Method Details

#inspectObject



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

def inspect
  "nothing"
end

#to_sObject



14
15
16
# File 'lib/code/object/nothing.rb', line 14

def to_s
  ""
end

#truthy?Boolean

Returns:



10
11
12
# File 'lib/code/object/nothing.rb', line 10

def truthy?
  false
end