Class: Prune::Elements::Info
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#author=(author) ⇒ Object
Set author of the document.
-
#initialize(document) ⇒ Info
constructor
Initialize.
-
#subject=(subject) ⇒ Object
Set subject of the document.
-
#title=(title) ⇒ Object
Set title of the document.
Methods inherited from Base
Methods included from Functions
Methods included from PObjects
Constructor Details
#initialize(document) ⇒ Info
Initialize.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/prune/elements/info.rb', line 8 def initialize(document) super(document) date = DateTime.now creation_date = date.strftime("D:%Y%m%d%H%M%S") creation_date << date.zone.sub(/:/, "'") + "'" creator = "#{APPLICATION}-#{VERSION}" # Set dictionary. @content = pd( pn(:CreationDate) => pl(creation_date), pn(:ModDate) => pl(creation_date), pn(:Author) => pl("UNKNOWN"), pn(:Title) => pl("UNKNOWN"), pn(:Creator) => pl(creator), pn(:Producer) => pl(creator), pn(:Trapped) => pn(:False)) # Register element to document. register end |
Instance Method Details
#author=(author) ⇒ Object
Set author of the document.
38 39 40 |
# File 'lib/prune/elements/info.rb', line 38 def () @content[pn(:Author)] = pl() end |
#subject=(subject) ⇒ Object
Set subject of the document.
33 34 35 |
# File 'lib/prune/elements/info.rb', line 33 def subject=(subject) @content[pn(:Subject)] = pl(subject) end |
#title=(title) ⇒ Object
Set title of the document.
28 29 30 |
# File 'lib/prune/elements/info.rb', line 28 def title=(title) @content[pn(:Title)] = pl(title) end |