Class: TrueClass

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

Instance Method Summary collapse

Instance Method Details

#format_by(fmt = 'T') ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/fat_core/boolean.rb', line 2

def format_by(fmt = 'T')
  case fmt
  when /^[tf]/i
    'T'
  when /^[yn]/i
    'Y'
  else
    'T'
  end
end