Class TaskJuggler::SheetSender
In: lib/taskjuggler/SheetSender.rb
Parent: SheetHandlerBase

A base class for sheet senders.

Methods

new   sendTemplates  

Included Modules

StdIoWrapper

Attributes

force  [RW] 
intervalDuration  [RW] 

Public Class methods

[Source]

# 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

Public Instance methods

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.

[Source]

# File lib/taskjuggler/SheetSender.rb, line 64
    def sendTemplates(resourceList)
      setWorkingDir
      createDirectories

      resources = genResourceList(resourceList)
      genTemplates(resources)
      sendReportTemplates(resources)
    end

[Validate]