Class: Propolize::DocumentProperty

Inherits:
DocumentComponent show all
Defined in:
lib/propolize.rb

Overview

A document property value definition, such as date = ‘23 May, 2014’

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ DocumentProperty

Returns a new instance of DocumentProperty.



550
551
552
553
# File 'lib/propolize.rb', line 550

def initialize(name, value)
  @name = name
  @value = value
end

Instance Method Details

#to_sObject



555
556
557
# File 'lib/propolize.rb', line 555

def to_s
  return "DocumentProperty #{@name} = #{@value.inspect}"
end

#writeToDocument(document) ⇒ Object

‘write’ to the document by setting the specified property value



560
561
562
# File 'lib/propolize.rb', line 560

def writeToDocument(document)
  document.setProperty(@name, @value)
end