summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/axlsx/util/validators.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/pane.rb2
-rw-r--r--test/util/tc_validators.rb8
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb
index f76c57ba..0f4f0dce 100644
--- a/lib/axlsx/util/validators.rb
+++ b/lib/axlsx/util/validators.rb
@@ -252,7 +252,7 @@ module Axlsx
# Requires that the value is a valid active pane type.
# valid types must be one of bottom_left, bottom_right, top_left, top_right
# @param [Any] v The value validated
- def self.validate_active_pane_type(v)
+ def self.validate_pane_type(v)
RestrictionValidator.validate :active_pane_type, [:bottom_left, :bottom_right, :top_left, :top_right], v
end
diff --git a/lib/axlsx/workbook/worksheet/pane.rb b/lib/axlsx/workbook/worksheet/pane.rb
index bf632c10..f658bc99 100644
--- a/lib/axlsx/workbook/worksheet/pane.rb
+++ b/lib/axlsx/workbook/worksheet/pane.rb
@@ -101,7 +101,7 @@ module Axlsx
# @see active_pane
- def active_pane=(v); Axlsx::validate_active_pane_type(v); @active_pane = v end
+ def active_pane=(v); Axlsx::validate_pane_type(v); @active_pane = v end
# @see state
diff --git a/test/util/tc_validators.rb b/test/util/tc_validators.rb
index 66138c54..4de13ec3 100644
--- a/test/util/tc_validators.rb
+++ b/test/util/tc_validators.rb
@@ -144,11 +144,11 @@ class TestValidators < Test::Unit::TestCase
#active_pane_type
[:bottom_left, :bottom_right, :top_left, :top_right].each do |sym|
- assert_nothing_raised { Axlsx.validate_active_pane_type sym }
+ assert_nothing_raised { Axlsx.validate_pane_type sym }
end
- assert_raise(ArgumentError) { Axlsx.validate_active_pane_type :other_symbol }
- assert_raise(ArgumentError) { Axlsx.validate_active_pane_type 'bottom_left' }
- assert_raise(ArgumentError) { Axlsx.validate_active_pane_type 0 }
+ assert_raise(ArgumentError) { Axlsx.validate_pane_type :other_symbol }
+ assert_raise(ArgumentError) { Axlsx.validate_pane_type 'bottom_left' }
+ assert_raise(ArgumentError) { Axlsx.validate_pane_type 0 }
#split_state_type
[:frozen, :frozen_split, :split].each do |sym|