class OoxmlParser::FontStyle
Class for working with font styles (bold,italic,underlined,strike)
Attributes
@return [false,true] is bold?
@return [false,true] is bold?
@return [Strike] strike type
@return [Underline] underline type
Public Class Methods
Source
# File lib/ooxml_parser/common_parser/common_data/font_style.rb, line 23 def initialize(bold = false, italic = false, underlined = Underline.new(:none), strike = :none) @bold = bold @italic = italic @underlined = underlined == false || underlined.nil? ? Underline.new(:none) : underlined @strike = strike end
Default constructor @param [true, false] bold is bold? @param [true, false] italic is italic? @param [true, false, String] underlined if not false or nil - default Underline
, else none @param [Symbol] strike string with strike type @return [FontStyle] new font style
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/font_style.rb, line 32 def ==(other) (@bold == other.bold) && (@italic == other.italic) && (@underlined == other.underlined) && (@strike == other.strike) end
Default == operator @return [true, false] true if two same, false if different