Class: Viewpoint::SPWS::Types::TasksList
- Includes:
- Viewpoint::SPWS::Types
- Defined in:
- lib/viewpoint/spws/types/tasks_list.rb
Overview
This class represents a Sharepoint List returned from the Lists Web Service with a ServerTemplate id of 107 (Tasks).
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_item!(opts) ⇒ Viewpoint::SPWS::Types::ListItem
Add a Task to this List.
Methods inherited from List
#delete!, #get_item, #hidden?, #initialize, #items, #path
Constructor Details
This class inherits a constructor from Viewpoint::SPWS::Types::List
Instance Method Details
#add_item!(opts) ⇒ Viewpoint::SPWS::Types::ListItem
Add a Task to this List
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/viewpoint/spws/types/tasks_list.rb', line 36 def add_item!(opts) raise "Title argument required" unless opts[:title] topts = opts.clone topts[:priority] = :normal unless topts[:priority] topts[:status] = :not_started unless topts[:status] if(topts[:percent_complete] && !(0..100).include?(topts[:percent_complete])) raise "Invalid :percent_complete #{topts[:percent_complete]}" end super(topts) end |