Sha256: ec2ab9519c100f73895d4211287db9c32ebd316b89b988030543fa8f6a42757a

Contents?: true

Size: 801 Bytes

Versions: 8

Compression:

Stored size: 801 Bytes

Contents

# main Phonelib module definition
module Phonelib
  # load phonelib classes/modules
  autoload :Core, 'phonelib/core'
  autoload :Phone, 'phonelib/phone'
  autoload :PhoneFormatter, 'phonelib/phone_formatter'
  autoload :PhoneAnalyzer, 'phonelib/phone_analyzer'
  autoload :PhoneAnalyzerHelper, 'phonelib/phone_analyzer_helper'
  autoload :PhoneExtendedData, 'phonelib/phone_extended_data'

  extend Core
end

if defined?(ActiveModel) || defined?(Rails)
  if RUBY_VERSION >= '3.0.0'
    autoload :PhoneValidator, 'validators/phone_validator3'
  else
    autoload :PhoneValidator, 'validators/phone_validator'
  end

  if defined?(Rails)
    class Phonelib::Railtie < Rails::Railtie
      initializer 'phonelib' do |app|
        app.config.eager_load_namespaces << Phonelib
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
phonelib-0.9.3 lib/phonelib.rb
phonelib-0.9.2 lib/phonelib.rb
phonelib-0.9.1 lib/phonelib.rb
phonelib-0.9.0 lib/phonelib.rb
phonelib-0.8.9 lib/phonelib.rb
phonelib-0.8.8 lib/phonelib.rb
phonelib-0.8.7 lib/phonelib.rb
phonelib-0.8.6 lib/phonelib.rb