Sha256: a0fae88b992d75e233191c3ff2425282fab28db56f7adcf55e0d42ef9319725e

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

require "gettext_simple_rails/engine"
require "string-cases"

module GettextSimpleRails
  def self.const_missing(name)
    require "#{::File.dirname(__FILE__)}/gettext_simple_rails/#{::StringCases.camel_to_snake(name)}"
    raise LoadError, "Still not loaded: '#{name}'." unless ::GettextSimpleRails.const_defined?(name)
    return ::GettextSimpleRails.const_get(name)
  end
  
  def self.translation_dir
    return "#{Rails.root}/lib/gettext_simple_rails"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gettext_simple_rails-0.0.2 lib/gettext_simple_rails.rb
gettext_simple_rails-0.0.1 lib/gettext_simple_rails.rb