Skip to content
Browse files

change underlined? to underline? for consistency

  • Loading branch information...
1 parent 4c92eaf commit 2a3d37184d7e8d218e939df75ada2196fa4bd340 @hmcgowan hmcgowan committed
Showing with 10 additions and 11 deletions.
  1. +1 −2 lib/roo/excel.rb
  2. +1 −1 lib/roo/excelx.rb
  3. +1 −1 lib/roo/openoffice.rb
  4. BIN test/style.xls
  5. +7 −7 test/test_roo.rb
View
3 lib/roo/excel.rb
@@ -190,11 +190,10 @@ def italic?(*args)
end
# true if the cell style is underline
- def underlined?(*args)
+ def underline?(*args)
cell_font(*args)[:underline]
end
-
# shows the internal representation of all cells
# mainly for debugging purposes
def to_s(sheet=nil)
View
2 lib/roo/excelx.rb
@@ -215,7 +215,7 @@ def italic?(*args)
end
# true if the cell style is underline
- def underlined?(*args)
+ def underline?(*args)
s_attribute = cell_style_attribute(*args)
@style_definitions[s_attribute][:underline]
end
View
2 lib/roo/openoffice.rb
@@ -136,7 +136,7 @@ def italic?(*args)
end
# true if the cell style is underline
- def underlined?(*args)
+ def underline?(*args)
style_name = cell_style_attribute(*args)
return false if style_name == 'Default'
@style_definitions[style_name][:underline]
View
BIN test/style.xls
Binary file not shown.
View
14 test/test_roo.rb
@@ -4872,31 +4872,31 @@ def verify_cell_fonts(oo)
oo.default_sheet = oo.sheets.first
assert_equal true, oo.bold?(1,1)
assert_equal false, oo.italic?(1,1)
- assert_equal false, oo.underlined?(1,1)
+ assert_equal false, oo.underline?(1,1)
assert_equal false, oo.bold?(2,1)
assert_equal true, oo.italic?(2,1)
- assert_equal false, oo.underlined?(2,1)
+ assert_equal false, oo.underline?(2,1)
assert_equal false, oo.bold?(3,1)
assert_equal false, oo.italic?(3,1)
- assert_equal false, oo.underlined?(3,1)
+ assert_equal false, oo.underline?(3,1)
assert_equal false, oo.bold?(4,1)
assert_equal false, oo.italic?(4,1)
- assert_equal true, oo.underlined?(4,1)
+ assert_equal true, oo.underline?(4,1)
assert_equal true, oo.bold?(5,1)
assert_equal true, oo.italic?(5,1)
- assert_equal false, oo.underlined?(5,1)
+ assert_equal false, oo.underline?(5,1)
assert_equal true, oo.bold?(6,1)
assert_equal false, oo.italic?(6,1)
- assert_equal true, oo.underlined?(6,1)
+ assert_equal true, oo.underline?(6,1)
assert_equal false, oo.bold?(7,1)
assert_equal true, oo.italic?(7,1)
- assert_equal true, oo.underlined?(7,1)
+ assert_equal true, oo.underline?(7,1)
end
def test_cell_styles

0 comments on commit 2a3d371

Please sign in to comment.
Something went wrong with that request. Please try again.