class PeanutLabs::Parser::Sex
Constants
- FEMALE
- MALE
Public Class Methods
call(value)
click to toggle source
# File lib/peanut_labs/parser/sex.rb, line 7 def self.call(value) return value.to_s if value.is_a?(Integer) && value < 3 && value.positive? return nil if value.is_a?(Integer) || value.nil? return '1' if MALE.include? value.downcase return '2' if FEMALE.include? value.downcase nil end