Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting disable_wrap_by_char option on cell text #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/prawn/table/cell/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Text < Cell

TextOptions = [:inline_format, :kerning, :size, :align, :valign,
:rotate, :rotate_around, :leading, :single_line, :skip_encoding,
:overflow, :min_font_size]
:overflow, :min_font_size, :disable_wrap_by_char]

TextOptions.each do |option|
define_method("#{option}=") { |v| @text_options[option] = v }
Expand Down
10 changes: 5 additions & 5 deletions manual/table/cell_text.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# encoding: utf-8
#
# Text cells accept the following options: <code>align</code>,
# <code>font</code>, <code>font_style</code>, <code>inline_format</code>,
# <code>kerning</code>, <code>leading</code>, <code>min_font_size</code>,
# <code>overflow</code>, <code>rotate</code>, <code>rotate_around</code>,
# <code>single_line</code>, <code>size</code>, <code>text_color</code>,
# and <code>valign</code>.
# <code>disable_wrap_by_char</code>, <code>font</code>, <code>font_style</code>,
# <code>inline_format</code>, <code>kerning</code>, <code>leading</code>,
# <code>min_font_size</code>, <code>overflow</code>, <code>rotate</code>,
# <code>rotate_around</code>, <code>single_line</code>, <code>size</code>,
# <code>text_color</code> and <code>valign</code>.
#
# Most of these style options are direct translations from the text methods
# styling options.
Expand Down