Sha256: 7b45ded22febcc895960b683e3aa8ab4abf33e114ed455d0b0544b55e3488940

Contents?: true

Size: 575 Bytes

Versions: 3

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

require "dry-initializer"
require_relative "localer/version"
require_relative "localer/rails"
require_relative "localer/config"
require_relative "localer/data"

module Localer # :nodoc:
  using Localer::Ext::Hash
  # using Localer::Ext::String

  class << self
    def data
      @data ||= load_data
    end

    def config
      @config ||= configure
    end

    def configure(options = {})
      @config = Config.load(options)
    end

    def load_data(source = Localer::Rails.translations)
      @data = Data.new(source)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
localer-0.2.0 lib/localer.rb
localer-0.1.1 lib/localer.rb
localer-0.1.0 lib/localer.rb