Class: Birddog::BooleanExpression

Inherits:
Object
  • Object
show all
Defined in:
lib/birddog/boolean_expression.rb

Class Method Summary collapse

Class Method Details

.parse(value) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/birddog/boolean_expression.rb', line 5

def self.parse(value)
  { "true"  => true,
    "yes"   => true,
    "y"     => true,
    "false" => false,
    "no"    => false,
    "n"     => false }.fetch("#{value.downcase}", true)
end