Method: HexaPDF::Type::Annotation#contents
- Defined in:
- lib/hexapdf/type/annotation.rb
#contents(text = :UNSET) ⇒ Object
:call-seq:
annot.contents => contents or +nil+
annot.contents(text) => annot
Returns the text of the annotation when no argument is given. Otherwise sets the text and returns self.
The contents is used differently depending on the annotation type. It is either the text that should be displayed for the annotation or an alternate description of the annotation’s contents.
A value of nil means deleting the existing contents entry.
296 297 298 299 300 301 302 303 |
# File 'lib/hexapdf/type/annotation.rb', line 296 def contents(text = :UNSET) if text == :UNSET self[:Contents] else self[:Contents] = text self end end |