Sha256: 08e0ca837caded951bf0230a1a70075de2d97f7b6c5aa3c84c8f9b7ee4eb63c2
Contents?: true
Size: 301 Bytes
Versions: 10
Compression:
Stored size: 301 Bytes
Contents
# frozen_string_literal: true require 'active_record' class Boolean def self.parse(value) ActiveRecord::Type::Boolean.new.cast(value) end def self.strict_parse(value) !!parse(value) end end class Object def yes_no_to_s !!self == self ? (self ? 'yes' : 'no') : to_s end end
Version data entries
10 entries across 10 versions & 1 rubygems