Method: Writeexcel::Format#set_italic
- Defined in:
- lib/writeexcel/format.rb
#set_italic(arg = 1) ⇒ Object
Set the italic property of the font:
Default state: Italic is off
Default action: Turn italic on
Valid args: 0, 1
format.set_italic # Turn italic on
678 679 680 681 682 683 684 685 686 687 |
# File 'lib/writeexcel/format.rb', line 678 def set_italic(arg = 1) begin if arg == 1 then @italic = 1 # italic on elsif arg == 0 then @italic = 0 # italic off else raise ArgumentError, "\n\n set_italic(#{arg.inspect})\n arg must be 0, 1, or none. ( 0:OFF , 1 and none:ON )\n" end end end |