Method: Axlsx::Axes#initialize
- Defined in:
- lib/axlsx/drawing/axes.rb
#initialize(options = {}) ⇒ Axes
should be an axis name like :val_axis and its value should be the class of the axis type to construct. The :cat_axis, if there is one, must come first (we assume a Ruby 1.9+ Hash or an OrderedHash).
11 12 13 14 15 16 |
# File 'lib/axlsx/drawing/axes.rb', line 11 def initialize(={}) raise(ArgumentError, "CatAxis must come first") if .keys.include?(:cat_axis) && .keys.first != :cat_axis .each do |name, axis_class| add_axis(name, axis_class) end end |