module ArDocStore

Constants

VERSION

Public Class Methods

convert_boolean(bool) click to toggle source
# File lib/ar_doc_store.rb, line 49
def self.convert_boolean(bool)
  if bool.is_a?(String)
    return true if bool == true || bool =~ (/^(true|t|yes|y|1)$/i)
    return false if bool == false || bool.blank? || bool =~ (/^(false|f|no|n|0)$/i)
  elsif bool.is_a?(Integer)
    return bool > 0
  elsif bool.is_a?(TrueClass)
    return true
  elsif bool.is_a?(FalseClass)
    return false
  else
    return nil
  end
end
mappings() click to toggle source
# File lib/ar_doc_store.rb, line 45
def self.mappings
  @mappings
end