class Tempo::Views::ViewRecords::Message

The most simple view records, with a message string and a category, which defaults to :info. Categories can be used for color / logging diferentiation. category :error will raise an error after all viewRecords have been run through the reporters

Containers send :pospone => true in options in order to manage triggering the message themselves

Attributes

category[RW]
message[RW]
type[RW]

Public Class Methods

new(message, options={}) click to toggle source
# File lib/tempo/views/view_records/base.rb, line 36
def initialize(message, options={})
  @message = message
  @category = options.fetch( :category, :info )
  @type = "message"
  Reporter.add_view_record self unless options[:postpone]
end

Public Instance Methods

format(&block) click to toggle source
# File lib/tempo/views/view_records/base.rb, line 43
def format(&block)
  block ||= lambda {|m| "#{m.message}"}
  block.call self
end