module Yano

Constants

VALID_NO_VALUE
VALID_YES_VALUE
VERSION

Public Class Methods

parse(val, opts = {}) click to toggle source
# File lib/yano.rb, line 10
def self.parse(val, opts = {})
  val = val.to_s.strip
  return true  if val =~ VALID_YES_VALUE
  return false if val =~ VALID_NO_VALUE
  return Lenient.check_lenient_values(val) if opts.delete(:lenient)
end