Module DocumentStyles::StyleAlignment
In: lib/document_styles.rb

位置合わせのスタイルを表すモジュール。

Methods

align   align=   align_expr  

Constants

DEFAULT_ALIGN = :left
EXPRESSION = { :left => 'L', :center => 'C', :right => 'R'

Public Instance methods

[Source]

     # File lib/document_styles.rb, line 152
152:     def align
153:       return @align ? @align : DEFAULT_ALIGN
154:     end

[Source]

     # File lib/document_styles.rb, line 143
143:     def align=(val)
144:       case(val)
145:       when :left, :center, :right
146:         @align = val
147:       else
148:         raise "Invalid alignment was specified #{val.inspect}"
149:       end
150:     end

[Source]

     # File lib/document_styles.rb, line 156
156:     def align_expr
157:       return EXPRESSION[self.align]
158:     end

[Validate]