Module: Bioroebe::VerboseTruth

Defined in:
lib/bioroebe/toplevel_methods/toplevel_methods.rb

Overview

#

Bioroebe::VerboseTruth

We use a simplified approach for adding VerboseTruth supported to the BioRoebe project, by simply defining it as a submodule.

#

Class Method Summary collapse

Class Method Details

.[](i, append_dot = true) ⇒ Object

#

Bioroebe::VerboseTruth[]

#


208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/bioroebe/toplevel_methods/toplevel_methods.rb', line 208

def self.[](i, append_dot = true)
  if i.is_a? Array
    i = i.first
  end
  result = ''.dup
  case i
  when 'true',
       true
    result << 'Yes'
  when 'false',
       false
    result << 'No'
  end
  result << '.' if append_dot
  result
end