Parent

Ditz::ScreenView

Public Class Methods

new(project, config, device=$stdout) click to toggle source
# File lib/views.rb, line 7
def initialize project, config, device=$stdout
  @device = device
  @config = config
end

Public Instance Methods

render_issue(issue) click to toggle source
# File lib/views.rb, line 21
def render_issue issue
  status = case issue.status
  when :closed
    "#{issue.status_string}: #{issue.disposition_string}"
  else
    issue.status_string
  end
  desc = if issue.desc.size < 80 - "Description: ".length
    issue.desc
  else
    "\n" + issue.desc.gsub(/^/, "  ") + "\n"
  end
  @device.puts #{"Issue #{issue.name}".underline}      Title: #{issue.title}Description: #{desc}       Type: #{issue.type}     Status: #{status}    Creator: #{issue.reporter}        Age: #{issue.creation_time.ago}    Release: #{issue.release} References: #{issue.references.listify "  "} Identifier: #{issue.id}

  self.class.view_additions_for(:issue_summary).each { |b| @device.print(b[issue, @config] || next) }
  puts
  self.class.view_additions_for(:issue_details).each { |b| @device.print(b[issue, @config] || next)  }

  @device.puts Event log:#{format_log_events issue.log_events}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.