Class: Scrivito::ObjClassCollection Deprecated
- Inherits:
-
Object
- Object
- Scrivito::ObjClassCollection
- Includes:
- Enumerable
- Defined in:
- lib/scrivito/obj_class_collection.rb
Overview
Deprecated.
This class allows you to retrieve obj classes from a specific working copy. It behaves almost exactly as an Array, so methods like #each
, #select
etc. are available. You can get an instance by accessing Workspace#obj_classes.
Instance Method Summary collapse
- #[](name) ⇒ ObjClass? deprecated Deprecated.
- #each {|ObjClass| ... } ⇒ Object deprecated Deprecated.
Instance Method Details
#[](name) ⇒ ObjClass?
Deprecated.
Finds an obj class by its name in the working copy of the collection.
29 30 31 32 33 |
# File 'lib/scrivito/obj_class_collection.rb', line 29 def [](name) if obj_class_data = CmsBackend.instance.find_obj_class_data_by_name(workspace.revision, name) ObjClass.new(obj_class_data, workspace) end end |
#each {|ObjClass| ... } ⇒ Object
Deprecated.
Yields successive obj classes of the collection. Implements the Enumerable
interface.
54 |
# File 'lib/scrivito/obj_class_collection.rb', line 54 delegate :each, to: :obj_classes |