Module: ExcelFontExtensions
- Defined in:
- lib/roo/excel.rb
Overview
ruby-spreadsheet has a font object so we’re extending it with our own functionality but still providing full access to the user for other font information
Instance Method Summary collapse
Instance Method Details
#bold?(*args) ⇒ Boolean
33 34 35 36 37 38 39 40 41 |
# File 'lib/roo/excel.rb', line 33 def bold?(*args) #From ruby-spreadsheet doc: 100 <= weight <= 1000, bold => 700, normal => 400 case weight when 700 true else false end end |
#italic? ⇒ Boolean
43 44 45 |
# File 'lib/roo/excel.rb', line 43 def italic? italic end |
#underline? ⇒ Boolean
47 48 49 |
# File 'lib/roo/excel.rb', line 47 def underline? underline != :none end |