Class: SimpleAMS::Document::Folder
- Inherits:
-
SimpleAMS::Document
- Object
- SimpleAMS::Document
- SimpleAMS::Document::Folder
- Includes:
- Enumerable
- Defined in:
- lib/simple_ams/document.rb
Instance Attribute Summary collapse
-
#members ⇒ Object
readonly
Returns the value of attribute members.
Attributes inherited from SimpleAMS::Document
#embedded_options, #options, #resource, #serializer
Instance Method Summary collapse
-
#documents ⇒ Object
do we really need this method ?.
- #each ⇒ Object
-
#initialize(options, embedded_options = nil) ⇒ Folder
constructor
A new instance of Folder.
- #resource_options ⇒ Object
Methods inherited from SimpleAMS::Document
#adapter, #document?, #embedded, #fields, #folder?, #forms, #generics, #links, #metas, #name, #primary_id, #relations, #type
Constructor Details
#initialize(options, embedded_options = nil) ⇒ Folder
Returns a new instance of Folder.
93 94 95 96 97 98 99 100 |
# File 'lib/simple_ams/document.rb', line 93 def initialize(, = nil) @_options = @embedded_options = @options = @_options. @members = .collection @resource = .resource end |
Instance Attribute Details
#members ⇒ Object (readonly)
Returns the value of attribute members.
90 91 92 |
# File 'lib/simple_ams/document.rb', line 90 def members @members end |
Instance Method Details
#documents ⇒ Object
do we really need this method ?
113 114 115 |
# File 'lib/simple_ams/document.rb', line 113 def documents each.map end |
#each ⇒ Object
102 103 104 105 106 107 108 109 110 |
# File 'lib/simple_ams/document.rb', line 102 def each return enum_for(:each) unless block_given? members.each do |resource| yield SimpleAMS::Document.new((resource)) end self end |
#resource_options ⇒ Object
117 118 119 |
# File 'lib/simple_ams/document.rb', line 117 def end |