Sha256: 2082448b70bca9fb96fe0bb2ca47cc87ab8126ed4d046f3fdec5a42695e6e3e5

Contents?: true

Size: 762 Bytes

Versions: 15

Compression:

Stored size: 762 Bytes

Contents

class Configuration
  DEFAULT_COUNTRIES = ["US", "GB", "AU", "IT", "RU", "NO"]
  attr_accessor :registered_operators, :default_countries, :custom_pstn_data_file

  def initialize
    @default_countries = DEFAULT_COUNTRIES
  end

  def default_countries=(value)
    @default_countries = value
    Torasup.load_international_dialing_codes!
  end

  def custom_pstn_data_file=(value)
    @custom_pstn_data_file = value
    Torasup.load_pstn_data!
  end

  def register_operators(country_code, *operators)
    registered_operators[country_code] = operators
    Torasup.load_pstn_data!
  end

  def registered_operators=(value)
    @registered_operators = value
    Torasup.load_pstn_data!
  end

  def registered_operators
    @registered_operators ||= {}
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
torasup-0.0.15 lib/torasup/configuration.rb
torasup-0.0.14 lib/torasup/configuration.rb
torasup-0.0.13 lib/torasup/configuration.rb
torasup-0.0.12 lib/torasup/configuration.rb
torasup-0.0.11 lib/torasup/configuration.rb
torasup-0.0.10 lib/torasup/configuration.rb
torasup-0.0.9 lib/torasup/configuration.rb
torasup-0.0.8 lib/torasup/configuration.rb
torasup-0.0.7 lib/torasup/configuration.rb
torasup-0.0.6 lib/torasup/configuration.rb
torasup-0.0.5 lib/torasup/configuration.rb
torasup-0.0.4 lib/torasup/configuration.rb
torasup-0.0.3 lib/torasup/configuration.rb
torasup-0.0.2 lib/torasup/configuration.rb
torasup-0.0.1 lib/torasup/configuration.rb