Class: TaskJuggler::SheetSender
- Inherits:
-
SheetHandlerBase
- Object
- SheetHandlerBase
- TaskJuggler::SheetSender
- Includes:
- StdIoWrapper
- Defined in:
- lib/taskjuggler/SheetSender.rb
Overview
A base class for sheet senders.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#force ⇒ Object
Returns the value of attribute force.
-
#intervalDuration ⇒ Object
Returns the value of attribute intervalDuration.
Attributes inherited from SheetHandlerBase
Instance Method Summary collapse
-
#initialize(appName, type) ⇒ SheetSender
constructor
A new instance of SheetSender.
-
#sendTemplates(resourceList) ⇒ Object
Send out report templates to a list of project resources.
Methods included from StdIoWrapper
Methods inherited from SheetHandlerBase
#addToScm, #cutOut, #error, #htmlMailBody, #info, #log, #sendEmail, #sendRichTextEmail, #setWorkingDir, #warning
Constructor Details
#initialize(appName, type) ⇒ SheetSender
Returns a new instance of SheetSender.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/taskjuggler/SheetSender.rb', line 30 def initialize(appName, type) super(appName) @sheetType = type # The following settings must be provided by the deriving class. # This is a LogicalExpression string that controls what resources should # not be getting a report sheet template. @hideResource = nil # This file contains the signature (date or interval) that the # SheetReceiver will accept as a valid signature. @signatureFile = nil # The base directory of the sheet templates. @templateDir = nil # When true, existing templates will be regenerated and send out again. # Otherwise the existing template will not be send out again. @force = false @signatureFilter = nil # The subject of the template email. @mailSubject = nil # The into text of the template email. @introText = nil # The end date of the reported interval. @date = Time.new.strftime('%Y-%m-%d') # Determines the length of the reported interval. @intervalDuration = '1w' # We need this to determine if we already sent out a report. @timeStamp = Time.new end |
Instance Attribute Details
#force ⇒ Object
Returns the value of attribute force.
26 27 28 |
# File 'lib/taskjuggler/SheetSender.rb', line 26 def force @force end |
#intervalDuration ⇒ Object
Returns the value of attribute intervalDuration.
26 27 28 |
# File 'lib/taskjuggler/SheetSender.rb', line 26 def intervalDuration @intervalDuration end |
Instance Method Details
#sendTemplates(resourceList) ⇒ Object
Send out report templates to a list of project resources. The resources are selected by the @hideResource filter expression and can be further limited with a list of resource IDs passed by resourceList.
64 65 66 67 68 69 70 71 |
# File 'lib/taskjuggler/SheetSender.rb', line 64 def sendTemplates(resourceList) setWorkingDir createDirectories resources = genResourceList(resourceList) genTemplates(resources) sendReportTemplates(resources) end |