class Tempo::Views::ViewRecords::Project

Project ViewRecords adds the project title, any tags, and a duration to the composite model. It also keeps track of the maximum title length of all Project views.

:depth is inhereted from Composite

Attributes

current[RW]
duration[RW]
tags[RW]
title[RW]

Public Class Methods

max_title_length(len=0) click to toggle source
# File lib/tempo/views/view_records/project.rb, line 15
def max_title_length(len=0)
  @max_title_length ||= 0
  @max_title_length = @max_title_length > len ? @max_title_length : len
end
new(model, options={}) click to toggle source
# File lib/tempo/views/view_records/project.rb, line 21
def initialize(model, options={})
  super model, options
  @title = model.title
  @tags = model.tags
  @current = model.current?
  @duration = Duration.new
  self.class.max_title_length @title.length
end