module Shamu::ToBoolExtension

Adds `to_bool` to strings, numbers, booleans and nil class to provide a consistent means of parsing values to a Boolean type.

Public Class Methods

extend!() click to toggle source

Extend common classes to add `to_model_id` method.

# File lib/shamu/to_bool_extension.rb, line 8
def self.extend!
  String.include Strings
  Integer.include Integers
  TrueClass.include Boolean
  FalseClass.include Boolean
  NilClass.include Nil
end