Class: Propolize::DocumentProperty
- Inherits:
-
DocumentComponent
- Object
- DocumentComponent
- Propolize::DocumentProperty
- Defined in:
- lib/propolize.rb
Overview
A document property value definition, such as date = ‘23 May, 2014’
Instance Method Summary collapse
-
#initialize(name, value) ⇒ DocumentProperty
constructor
A new instance of DocumentProperty.
- #to_s ⇒ Object
-
#writeToDocument(document) ⇒ Object
‘write’ to the document by setting the specified property value.
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_s ⇒ Object
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 |