Class Stella::Report

  1. lib/stella/report.rb
Parent: Storable

Methods

public class

  1. load
  2. new
  3. plugin?

public instance

  1. postprocess
  2. process
  3. processed?

Included modules

  1. Gibbler::Complex

Constants

CRLF = "\r\n" unless defined?(Report::CRLF)

Attributes

filter [R]
plugin_order [R]
plugins [R]
timeline [R]

Public class methods

load (name)
[show source]
# File lib/stella/report.rb, line 32
      def load(name)
        @plugins[name]
      end
new (timeline=nil, runid=nil)
[show source]
# File lib/stella/report.rb, line 368
    def initialize(timeline=nil, runid=nil)
      @timeline, @runid = timeline, runid
      @processed = false
    end
plugin? (name)
[show source]
# File lib/stella/report.rb, line 29
      def plugin?(name)
        @plugins.has_key? name
      end

Public instance methods

postprocess ()
[show source]
# File lib/stella/report.rb, line 372
    def postprocess
      self.class.plugins.each_pair do |name,klass|
        val = klass.from_hash(self.send(name))
        self.send("#{name}=", val)
      end
      # When we load a report from a hash, some plugin
      # attributes need to be recontituted from a hash as well. 
      (self.content.log || []).collect! { |v| Stella::Log::HTTP.from_hash(v) }
    end
process ()
[show source]
# File lib/stella/report.rb, line 381
    def process
      self.class.plugin_order.each do |name|
        klass = self.class.plugins[name]
        Stella.ld "processing #{name}"
        plugin = klass.new self
        plugin.process(filter)
        self.send("#{name}=", plugin)
      end
      @processed = true
    end
processed? ()
[show source]
# File lib/stella/report.rb, line 391
    def processed?
      @processed == true
    end