Class: Abstract
Instance Method Summary collapse
-
#initialize(dir) ⇒ Abstract
constructor
A new instance of Abstract.
- #locales ⇒ Object
-
#routes ⇒ Object
def config options = {} rad.config.merge_config! “##dir/config/config.yml”, options end.
Constructor Details
#initialize(dir) ⇒ Abstract
4 5 6 |
# File 'lib/rad/configurators/abstract.rb', line 4 def initialize dir @dir = File.(dir) end |
Instance Method Details
#locales ⇒ Object
17 18 19 20 |
# File 'lib/rad/configurators/abstract.rb', line 17 def locales I18n.load_path += Dir["#{dir}/config/locales/**/*.{rb,yml}"] I18n.load_path += Dir["#{dir}/config/locales/*.{rb,yml}"] end |
#routes ⇒ Object
def config options = {}
rad.config.merge_config! "#{dir}/config/config.yml",
end
12 13 14 15 |
# File 'lib/rad/configurators/abstract.rb', line 12 def routes routes_file = "#{dir}/config/routes.rb" load routes_file if File.exist? routes_file end |