Sha256: 37d5d3c72ae739ba740ada7f78130b96dc54128193a34075dcd9359e819583a5

Contents?: true

Size: 423 Bytes

Versions: 3

Compression:

Stored size: 423 Bytes

Contents

module TestDocumentHelper
  def status_line(status)
    text "Status: #{status}"
  end
end

class TestDocument < PrawnCocktail::Document
  helper TestDocumentHelper
  initialize_template { text "Init works." }

  def initialize(status)
    @status = status
  end

  private

  def data
    { nested: { status: @status } }
  end
end

class SubTestDocument < TestDocument
  initialize_template { text "Sub-init works." }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawn_cocktail-0.8.1 spec/fixtures/document.rb
prawn_cocktail-0.7.1 spec/fixtures/document.rb
prawn_cocktail-0.7.0 spec/fixtures/document.rb