Class: Viewpoint::SPWS::Types::DocumentLibrary
- Includes:
- Viewpoint::SPWS::Types
- Defined in:
- lib/viewpoint/spws/types/document_library.rb
Overview
This class represents a Sharepoint List returned from the Lists Web Service with a ServerTemplate id of 101 (DocumentLibrary).
Constant Summary
Constants included from Viewpoint::SPWS::Types
Instance Attribute Summary
Attributes inherited from List
#created, #description, #feature_id, #guid, #modified, #root_folder, #server_template, #title
Instance Method Summary collapse
-
#add_file!(opts) ⇒ Viewpoint::SPWS::Types::ListItem
Add a Document to this List.
-
#initialize(ws, xml) ⇒ DocumentLibrary
constructor
A new instance of DocumentLibrary.
Methods inherited from List
#add_item!, #delete!, #get_item, #hidden?, #items, #path
Constructor Details
Instance Method Details
#add_file!(opts) ⇒ Viewpoint::SPWS::Types::ListItem
Add a Document to this List
36 37 38 39 40 |
# File 'lib/viewpoint/spws/types/document_library.rb', line 36 def add_file!(opts) raise "Valid file argument required" unless(opts[:file] && File.exists?(opts[:file])) fqpath = "#{self.path}/#{File.basename(opts[:file])}" @copy_ws.copy_into_items(opts[:file], [fqpath]) end |