Class: Zm::Client::ShareMountPointsCollection
- Inherits:
-
Object
- Object
- Zm::Client::ShareMountPointsCollection
- Defined in:
- lib/zm/client/share/share_mountpoints_collection.rb
Overview
collection of share mountpoints
Instance Method Summary collapse
- #all ⇒ Object
- #all! ⇒ Object
-
#initialize(share) ⇒ ShareMountPointsCollection
constructor
A new instance of ShareMountPointsCollection.
- #new ⇒ Object
Constructor Details
#initialize(share) ⇒ ShareMountPointsCollection
Returns a new instance of ShareMountPointsCollection.
7 8 9 |
# File 'lib/zm/client/share/share_mountpoints_collection.rb', line 7 def initialize(share) @share = share end |
Instance Method Details
#all ⇒ Object
21 22 23 |
# File 'lib/zm/client/share/share_mountpoints_collection.rb', line 21 def all @all || all! end |
#all! ⇒ Object
25 26 27 |
# File 'lib/zm/client/share/share_mountpoints_collection.rb', line 25 def all! @all = @share.parent.mountpoints.all.select { |mp| mp.zid == @share.ownerId && mp.rid == @share.folderId } end |
#new ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/zm/client/share/share_mountpoints_collection.rb', line 11 def new MountPoint.new(@share.parent) do |mp| mp.l = FolderDefault::ROOT[:id] mp.name = default_mountpoint_name mp.zid = @share.ownerId mp.rid = @share.folderId mp.view = @share.view end end |