Class: Pdf::Components::Date

Inherits:
Pdf::Component show all
Defined in:
lib/pdf/components/date.rb

Constant Summary collapse

DEFAULT_FORMAT =
"%B %d, %Y"

Instance Attribute Summary

Attributes inherited from Pdf::Component

#pdf

Instance Method Summary collapse

Methods inherited from Pdf::Component

#initialize

Constructor Details

This class inherits a constructor from Pdf::Component

Instance Method Details

#render(value, format: DEFAULT_FORMAT, size: 10, align: :right, **options) ⇒ Object



8
9
10
11
12
# File 'lib/pdf/components/date.rb', line 8

def render(value, format: DEFAULT_FORMAT, size: 10, align: :right, **options)
  formatted = format_date(value, format)
  text formatted, size: size, align: align, **options
  move_down 5
end