Sha256: 0344a706f1ab2855023d2cac8d4a0a5a2e0615df059507717bdabfa7cce60e90

Contents?: true

Size: 524 Bytes

Versions: 6

Compression:

Stored size: 524 Bytes

Contents

require 'rrtf'

DIR = File.dirname(__FILE__)

rtf = RRTF::Document.new
rtf.paragraph do |p|
  p << "Should you ever find yourself on a spacefaring vessel wearing a "
  p.apply(
    "foreground_color" => '#ff0000',
    "underline_color" => '#ff0000',
    "italic" => true,
    "bold" => true,
    "underline" => "SINGLE"
  ) << "red"
  p << " shirt, take heed and be on guard, for danger "
  p << "is immanent and you are likely expendable among the crew."
end
File.open(DIR+'/04.rtf', 'w') { |file| file.write(rtf.to_rtf) }

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rrtf-1.3.1 examples/04_paragraph_with_character_style.rb
rrtf-1.3.0 examples/04_paragraph_with_character_style.rb
rrtf-1.2.0 examples/04_paragraph_with_character_style.rb
rrtf-1.1.0 examples/04_paragraph_with_character_style.rb
rrtf-1.0.1 examples/04_paragraph_with_character_style.rb
rrtf-1.0.0 examples/04_paragraph_with_character_style.rb