Class: Abstract
- Inherits:
-
Object
- Object
- Abstract
- Defined in:
- lib/rad/configurators/abstract.rb
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
Returns a new instance of Abstract.
2 3 4 |
# File 'lib/rad/configurators/abstract.rb', line 2 def initialize dir @dir = File.(dir) end |
Instance Method Details
#locales ⇒ Object
15 16 17 18 |
# File 'lib/rad/configurators/abstract.rb', line 15 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
10 11 12 13 |
# File 'lib/rad/configurators/abstract.rb', line 10 def routes routes_file = "#{dir}/config/routes.rb" load routes_file if File.exist? routes_file end |