Sha256: cfb1be17f9b7cb29eff4c4ac14d383b13a0a975762c9255aa90ef32e711d53f5

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

require "zeitwerk"
loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
loader.setup

module EpbViewModels
  VERSION = "1.2.2"
end

# Monkey patching to avoid using ActiveRecord::Type::Boolean.new.cast
# Source: http://jeffgardner.org/2011/08/04/rails-string-to-boolean-method/
class String
  def to_bool
    return true   if self == true   || self =~ (/(true|t|yes|y|1)$/i)
    return false  if self == false  || blank? || self =~ (/(false|f|no|n|0)$/i)

    raise ArgumentError, "invalid value for Boolean: \"#{self}\""
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
epb_view_models-1.2.2 lib/epb_view_models.rb