Class: FalseClass

Inherits:
Object show all
Defined in:
lib/runtime/mixins.rb

Overview

The FalseClass class

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



213
214
215
# File 'lib/runtime/mixins.rb', line 213

def +(other)
  format(JoinedTemplate, str: self.to_s, other: other.to_s)
end

#<(other) ⇒ Object



223
224
225
226
227
# File 'lib/runtime/mixins.rb', line 223

def <(other)
  other > 0
rescue StandardError => _e
  false
end

#>(other) ⇒ Object



217
218
219
220
221
# File 'lib/runtime/mixins.rb', line 217

def >(other)
  other < 0
rescue StandardError => _e
  false
end

#to_fObject



240
241
242
# File 'lib/runtime/mixins.rb', line 240

def to_f
  0.0
end

#to_iObject

Don’t do this, it will almost definitely break a lot of things. def ==(other)

other.number? && other.to_i == 0

rescue StandardError => _e

false

end



236
237
238
# File 'lib/runtime/mixins.rb', line 236

def to_i
  0
end