diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-04-12 16:55:10 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-12 16:55:10 +0200 |
| commit | 4643fbded250a02191f0e652618ee23fcf26c8b6 (patch) | |
| tree | 1b4fa5d8c85ed10c866b22e0cc7c480ffe7921de /lib/axlsx/drawing/num_data_source.rb | |
| parent | bad5cac91b653848bffb4fb45326664f9d806ed2 (diff) | |
| parent | c4bd23bdb6b20763027370f7db13cef1ed7d6e75 (diff) | |
| download | caxlsx-4643fbded250a02191f0e652618ee23fcf26c8b6.tar.gz caxlsx-4643fbded250a02191f0e652618ee23fcf26c8b6.zip | |
Merge pull request #191 from tagliala/chore/add-rubocop
Add RuboCop (and fix simple whitespace, magic comment, trailing comma offenses)
Diffstat (limited to 'lib/axlsx/drawing/num_data_source.rb')
| -rw-r--r-- | lib/axlsx/drawing/num_data_source.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/axlsx/drawing/num_data_source.rb b/lib/axlsx/drawing/num_data_source.rb index e0e97e41..46f6ba71 100644 --- a/lib/axlsx/drawing/num_data_source.rb +++ b/lib/axlsx/drawing/num_data_source.rb @@ -1,14 +1,12 @@ module Axlsx - # A numeric data source for use by charts. class NumDataSource - include Axlsx::OptionsParser # creates a new NumDataSource object # @option options [Array] data An array of Cells or Numeric objects # @option options [Symbol] tag_name see tag_name - def initialize(options={}) + def initialize(options = {}) # override these three in child classes @data_type ||= NumData @tag_name ||= :val @@ -22,7 +20,6 @@ module Axlsx parse_options options end - # The tag name to use when serializing this data source. # Only items defined in allowed_tag_names are allowed # @return [Symbol] @@ -36,7 +33,7 @@ module Axlsx [:yVal, :val, :bubbleSize] end - # sets the tag name for this data source + # sets the tag name for this data source # @param [Symbol] v One of the allowed_tag_names def tag_name=(v) Axlsx::RestrictionValidator.validate "#{self.class.name}.tag_name", self.class.allowed_tag_names, v @@ -45,7 +42,7 @@ module Axlsx # serialize the object # @param [String] str - def to_xml_string(str="") + def to_xml_string(str = "") str << ('<c:' << tag_name.to_s << '>') if @f str << ('<c:' << @ref_tag_name.to_s << '>') @@ -59,4 +56,3 @@ module Axlsx end end end - |
