Class: FeatherCms::Config
- Inherits:
-
Object
- Object
- FeatherCms::Config
- Defined in:
- lib/feather_cms/config.rb
Class Method Summary collapse
Class Method Details
.init {|_self| ... } ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/feather_cms/config.rb', line 5 def init(&block) @@config ||= {} yield self if block_given? @@config[:layouts] = Dir.entries(Rails.root.to_s + '/app/views/layouts').reject do |i| i.start_with?('.', '_') || File.directory?(i) end.collect{|l| l.split('.').first} end |
.layouts ⇒ Object
15 16 17 |
# File 'lib/feather_cms/config.rb', line 15 def layouts @@config[:layouts] end |