Sha256: 15f03e7c41112835c9cad6274fe5eeef148b050abff931ff6d8b91b84c1f32fc

Contents?: true

Size: 617 Bytes

Versions: 6

Compression:

Stored size: 617 Bytes

Contents

#encoding: utf-8

module Flyboy
  class Roadmap < Prawn::Document
    attr_accessor :tasks

    def initialize(tasks)
      super(:page_layout => :landscape)
      @tasks = tasks
    end

    def build
      font_size 10
      text "Plan d'actions au #{I18n.l(Date.today)}", :size => 20
      move_down(10)
      display_tasks(@tasks)
    end

    def display_tasks(tasks)
      display = [['Action', 'Titre', 'Echéance']]

      tasks.each do |t|
        display << [
          t.goal.title,
          t.title,
          I18n.l(t.term)
        ]
      end

      table display
      move_down(10)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flyboy-0.0.6 app/pdfs/flyboy/roadmap.rb
flyboy-0.0.5 app/pdfs/flyboy/roadmap.rb
flyboy-0.0.4 app/pdfs/flyboy/roadmap.rb
flyboy-0.0.3 app/pdfs/flyboy/roadmap.rb
flyboy-0.0.2 app/pdfs/flyboy/roadmap.rb
flyboy-0.0.1 app/pdfs/flyboy/roadmap.rb