Class: Rich::Cms::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Rich::Cms::Engine
- Defined in:
- lib/rich/cms/engine.rb
Defined Under Namespace
Classes: RichCmsError
Class Attribute Summary collapse
-
.current_controller ⇒ Object
writeonly
Sets the attribute current_controller.
-
.editable_content ⇒ Object
readonly
Returns the value of attribute editable_content.
Class Method Summary collapse
Class Attribute Details
.current_controller=(value) ⇒ Object (writeonly)
Sets the attribute current_controller
10 11 12 |
# File 'lib/rich/cms/engine.rb', line 10 def current_controller=(value) @current_controller = value end |
.editable_content ⇒ Object (readonly)
Returns the value of attribute editable_content.
9 10 11 |
# File 'lib/rich/cms/engine.rb', line 9 def editable_content @editable_content end |
Class Method Details
.init ⇒ Object
12 13 14 15 16 |
# File 'lib/rich/cms/engine.rb', line 12 def init @editable_content = {} append_to_load_path setup_assets end |
.register(*args) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/rich/cms/engine.rb', line 18 def register(*args) (editables = args.first.is_a?(Hash) ? args.first : Hash[*args]).each do |selector, specs| if @editable_content.keys.include?(selector) raise RichCmsError, "Already registered editable content identified with #{selector.inspect}" else @editable_content[selector] = Cms::Content::Group.build(selector, specs) end end end |