Module: Graffle::Text
- Included in:
- Note
- Defined in:
- lib/graffle/stereotypes.rb
Overview
OmniGraffle text is RTF. This gives access to an object’s text.
Defined Under Namespace
Classes: Null
Instance Method Summary collapse
-
#as_lines ⇒ Object
Return an array of lines, each line as_plain_text.
-
#as_plain_text ⇒ Object
Strip all the styling from the RTF string and return it as humble ASCII.
-
#as_rtf ⇒ Object
Return the text as the original RTF string.
Instance Method Details
#as_lines ⇒ Object
Return an array of lines, each line as_plain_text.
524 525 526 |
# File 'lib/graffle/stereotypes.rb', line 524 def as_lines StyledTextReader.new(self.as_rtf).as_lines end |
#as_plain_text ⇒ Object
Strip all the styling from the RTF string and return it as humble ASCII.
519 520 521 |
# File 'lib/graffle/stereotypes.rb', line 519 def as_plain_text as_lines.join("\n") end |
#as_rtf ⇒ Object
Return the text as the original RTF string.
513 514 515 |
# File 'lib/graffle/stereotypes.rb', line 513 def as_rtf self['Text'] end |