Class: Bizside::Yes

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

Class Method Summary collapse

Class Method Details

.confirmed?(yes_value) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
# File 'lib/bizside/yes.rb', line 4

def self.confirmed?(yes_value)
  case yes_value.to_s.downcase
  when 't', 'true', 'y', 'yes'
    true
  when 'f', 'false', 'n', 'no'
    false
  else
    nil
  end
end