prawn-ruby/pdf-core-0.6.0/lib/pdf/core/text.rb
# Call with no argument to retrieve the current text direction.
#
# Call with a symbol to set the document-wide text direction. This can be
# overridden using the :direction text option when drawing text or a text
# box.
#
#   pdf.text_direction = :rtl
#   pdf.text("hello world")                     # prints "dlrow olleh"
#   pdf.text("hello world", :direction => :ltr) # prints "hello world"
#
# Valid directions are:
#
# * :ltr             - left-to-right (default)
# * :rtl             - right-to-left
#
# Side effects:
#
# * When printing left-to-right, the default text alignment is :left
# * When printing right-to-left, the default text alignment is :right
#
Call with no argument to retrieve the current text direction.
Call with a symbol to set the document-wide text direction. This can be
overridden using the :direction text option when drawing text or a text
box.



Valid directions are.



Side effects.

When printing left-to-right, the default text alignment is :left
When printing right-to-left, the default text alignment is :right
Call with no argument to retrieve the current text direction . Call with a symbol to set the document - wide text direction . This can be overridden using the : direction text option when drawing text or a text box . Valid directions are . Side effects . When printing left - to - right the default text alignment is : left When printing right - to - left the default text alignment is : right
def text_direction(direction=nil)
        if direction.nil?
          defined?(@text_direction) && @text_direction || :ltr
        else
          @text_direction = direction
        end
      end
def text_direction ( direction = nil ) if direction . nil? defined? ( @text_direction ) && @text_direction || :ltr else @text_direction = direction end end
Call with no argument to retrieve the current text direction.
Call with no argument to retrieve the current text direction .
direction
<not_specific>