Class: Scrivito::WidgetCollection
- Inherits:
-
Object
- Object
- Scrivito::WidgetCollection
- Includes:
- Enumerable
- Defined in:
- app/cms/scrivito/widget_collection.rb
Overview
Instance Method Summary collapse
-
#[](widget_id) ⇒ Scrivito::BasicWidget?
Access a Widget by its
id
. - #each {|Scrivito::BasicWidget| ... } ⇒ Object
Instance Method Details
#[](widget_id) ⇒ Scrivito::BasicWidget?
Access a Widget by its id
16 17 18 |
# File 'app/cms/scrivito/widget_collection.rb', line 16 def []() obj.() end |
#each {|Scrivito::BasicWidget| ... } ⇒ Object
Enables you to iterate the Widgets of an Obj. Includes the Enumerable mixin and thereby provides methods like map
or select
.
29 30 31 |
# File 'app/cms/scrivito/widget_collection.rb', line 29 def each(&block) obj..each(&block) end |