Class: FalseClass

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

Overview

The FalseClass class

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



214
215
216
# File 'lib/story_teller/mixins.rb', line 214

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

#<(other) ⇒ Object



224
225
226
227
228
# File 'lib/story_teller/mixins.rb', line 224

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

#>(other) ⇒ Object



218
219
220
221
222
# File 'lib/story_teller/mixins.rb', line 218

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

#to_fObject



241
242
243
# File 'lib/story_teller/mixins.rb', line 241

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



237
238
239
# File 'lib/story_teller/mixins.rb', line 237

def to_i
  0
end