Class: NilClass

Inherits:
Object
  • Object
show all
Defined in:
lib/santas_little_helper.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject

Humanize. to_s returns “” as well, this is really to be consistent with other classes.



93
94
95
# File 'lib/santas_little_helper.rb', line 93

def to_h
  ""
end

#to_iObject

Since in if/else nil is interpreted as false, return same as false.



88
89
90
# File 'lib/santas_little_helper.rb', line 88

def to_i
  0
end

#to_teenagerObject

A very rude teenager nihilist.



98
99
100
# File 'lib/santas_little_helper.rb', line 98

def to_teenager
  "Zip! Nada! Babkis! Nothing to see here! Get out of my room!"
end