diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-08 00:12:18 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-08 00:12:18 +0200 |
| commit | 5d68145521afe5c5912ceebae2f7e784eb5f8954 (patch) | |
| tree | 5289c654cb213de98a6c812fbe581e2609f6615a | |
| parent | 7f077b55bf963c6e855c6c9066c6aed4926fb8e3 (diff) | |
| download | caxlsx-5d68145521afe5c5912ceebae2f7e784eb5f8954.tar.gz caxlsx-5d68145521afe5c5912ceebae2f7e784eb5f8954.zip | |
Fix EmptyLines related offenses
227 files changed, 0 insertions, 431 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 67093bb7..7dc60f46 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -41,25 +41,6 @@ Layout/ArgumentAlignment: Layout/EmptyLineAfterGuardClause: Enabled: false -# Offense count: 285 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only -Layout/EmptyLinesAroundClassBody: - Enabled: false - -# Offense count: 31 -# This cop supports safe autocorrection (--autocorrect). -Layout/EmptyLinesAroundMethodBody: - Enabled: false - -# Offense count: 96 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines -Layout/EmptyLinesAroundModuleBody: - Enabled: false - # Offense count: 58 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. diff --git a/lib/axlsx/content_type/abstract_content_type.rb b/lib/axlsx/content_type/abstract_content_type.rb index 82a659dd..73d8a678 100644 --- a/lib/axlsx/content_type/abstract_content_type.rb +++ b/lib/axlsx/content_type/abstract_content_type.rb @@ -1,8 +1,6 @@ module Axlsx - # This class extracts the common parts from Default and Override class AbstractContentType - include Axlsx::OptionsParser # Initializes an abstract content type @@ -27,6 +25,5 @@ module Axlsx str << Axlsx.instance_values_for(self).map { |key, value| Axlsx::camel(key) << '="' << value.to_s << '"' }.join(' ') str << '/>' end - end end diff --git a/lib/axlsx/content_type/content_type.rb b/lib/axlsx/content_type/content_type.rb index e6dfdee5..48b5b6a9 100644 --- a/lib/axlsx/content_type/content_type.rb +++ b/lib/axlsx/content_type/content_type.rb @@ -5,7 +5,6 @@ module Axlsx # ContentTypes used in the package. This is automatically managed by the package package. class ContentType < SimpleTypedList - def initialize super [Override, Default] end @@ -19,7 +18,5 @@ module Axlsx each { |type| type.to_xml_string(str) } str << '</Types>' end - end - end diff --git a/lib/axlsx/content_type/default.rb b/lib/axlsx/content_type/default.rb index be3a7c04..691b7e87 100644 --- a/lib/axlsx/content_type/default.rb +++ b/lib/axlsx/content_type/default.rb @@ -1,8 +1,6 @@ module Axlsx - # An default content part. These parts are automatically created by for you based on the content of your package. class Default < AbstractContentType - # The serialization node name for this class NODE_NAME = 'Default' @@ -20,5 +18,4 @@ module Axlsx super(NODE_NAME, str) end end - end diff --git a/lib/axlsx/content_type/override.rb b/lib/axlsx/content_type/override.rb index 39303e80..5fb98d4c 100644 --- a/lib/axlsx/content_type/override.rb +++ b/lib/axlsx/content_type/override.rb @@ -1,8 +1,6 @@ module Axlsx - # An override content part. These parts are automatically created by for you based on the content of your package. class Override < AbstractContentType - # Serialization node name for this object NODE_NAME = 'Override' diff --git a/lib/axlsx/doc_props/app.rb b/lib/axlsx/doc_props/app.rb index 64a193cf..ed46cf56 100644 --- a/lib/axlsx/doc_props/app.rb +++ b/lib/axlsx/doc_props/app.rb @@ -1,5 +1,4 @@ module Axlsx - # App represents the app.xml document. The attributes for this object are primarily managed by the application the end user uses to edit the document. None of the attributes are required to serialize a valid xlsx object. # @see shared-documentPropertiesExtended.xsd # @note Support is not implemented for the following complex types: @@ -9,7 +8,6 @@ module Axlsx # HLinks (VectorVariant), # DigSig (DigSigBlob) class App - include Axlsx::OptionsParser # Creates an App object @@ -228,7 +226,5 @@ module Axlsx end str << '</Properties>' end - end - end diff --git a/lib/axlsx/doc_props/core.rb b/lib/axlsx/doc_props/core.rb index 541fa1ad..279b7493 100644 --- a/lib/axlsx/doc_props/core.rb +++ b/lib/axlsx/doc_props/core.rb @@ -1,10 +1,8 @@ module Axlsx - # The core object for the package. # @note Packages manage their own core object. # @see Package#core class Core - # Creates a new Core object. # @option options [String] creator # @option options [Time] created @@ -32,7 +30,5 @@ module Axlsx str << '<cp:revision>0</cp:revision>' str << '</cp:coreProperties>' end - end - end diff --git a/lib/axlsx/drawing/area_chart.rb b/lib/axlsx/drawing/area_chart.rb index fa0f5ebf..7e831447 100644 --- a/lib/axlsx/drawing/area_chart.rb +++ b/lib/axlsx/drawing/area_chart.rb @@ -1,5 +1,4 @@ module Axlsx - # The AreaChart is a two dimentional line chart (who would have guessed?) that you can add to your worksheet. # @example Creating a chart # # This example creates a line in a single sheet. @@ -19,7 +18,6 @@ module Axlsx # @see Series # @see Package#serialize class AreaChart < Chart - # the category axis # @return [CatAxis] def cat_axis diff --git a/lib/axlsx/drawing/area_series.rb b/lib/axlsx/drawing/area_series.rb index a168bb07..fd3dd501 100644 --- a/lib/axlsx/drawing/area_series.rb +++ b/lib/axlsx/drawing/area_series.rb @@ -4,7 +4,6 @@ module Axlsx # @see Worksheet#add_chart # @see Chart#add_series class AreaSeries < Series - # The data for this series. # @return [ValAxisData] attr_reader :data @@ -104,6 +103,5 @@ module Axlsx # assigns the labels for this series def labels=(v) DataTypeValidator.validate "Series.labels", [AxDataSource], v; @labels = v; end - end end diff --git a/lib/axlsx/drawing/ax_data_source.rb b/lib/axlsx/drawing/ax_data_source.rb index cef683dd..10eb6c5e 100644 --- a/lib/axlsx/drawing/ax_data_source.rb +++ b/lib/axlsx/drawing/ax_data_source.rb @@ -1,9 +1,7 @@ module Axlsx - # An axis data source that can contain referenced or literal strings or numbers # @note only string data types are supported - mainly because we have not implemented a chart type that requires a numerical axis value class AxDataSource < NumDataSource - # creates a new NumDataSource object # @option options [Array] data An array of Cells or Numeric objects # @option options [Symbol] tag_name see tag_name @@ -19,7 +17,5 @@ module Axlsx def self.allowed_tag_names [:xVal, :cat] end - end - end diff --git a/lib/axlsx/drawing/axes.rb b/lib/axlsx/drawing/axes.rb index 6e66dcc0..146d566e 100644 --- a/lib/axlsx/drawing/axes.rb +++ b/lib/axlsx/drawing/axes.rb @@ -1,9 +1,7 @@ module Axlsx - # The Axes class creates and manages axis information and # serialization for charts. class Axes - # @param [Hash] options options used to generate axis each key # 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, diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb index eb9a0759..6f65f147 100644 --- a/lib/axlsx/drawing/axis.rb +++ b/lib/axlsx/drawing/axis.rb @@ -1,8 +1,6 @@ module Axlsx - # the access class defines common properties and values for a chart axis. class Axis - include Axlsx::OptionsParser # Creates an Axis object @@ -183,7 +181,5 @@ module Axlsx str << ('<c:crossAx val="' << @cross_axis.id.to_s << '"/>') str << ('<c:crosses val="' << @crosses.to_s << '"/>') end - end - end diff --git a/lib/axlsx/drawing/bar_3D_chart.rb b/lib/axlsx/drawing/bar_3D_chart.rb index 33eac167..1bb47da7 100644 --- a/lib/axlsx/drawing/bar_3D_chart.rb +++ b/lib/axlsx/drawing/bar_3D_chart.rb @@ -1,12 +1,10 @@ module Axlsx - # The Bar3DChart is a three dimentional barchart (who would have guessed?) that you can add to your worksheet. # @see Worksheet#add_chart # @see Chart#add_series # @see Package#serialize # @see README for an example class Bar3DChart < Chart - # the category axis # @return [CatAxis] def cat_axis diff --git a/lib/axlsx/drawing/bar_chart.rb b/lib/axlsx/drawing/bar_chart.rb index e3260ca0..84b9faa1 100644 --- a/lib/axlsx/drawing/bar_chart.rb +++ b/lib/axlsx/drawing/bar_chart.rb @@ -1,12 +1,10 @@ module Axlsx - # The BarChart is a two dimentional barchart that you can add to your worksheet. # @see Worksheet#add_chart # @see Chart#add_series # @see Package#serialize # @see README for an example class BarChart < Chart - # the category axis # @return [CatAxis] def cat_axis diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb index 2ee40488..fcf7d98f 100644 --- a/lib/axlsx/drawing/bar_series.rb +++ b/lib/axlsx/drawing/bar_series.rb @@ -4,7 +4,6 @@ module Axlsx # @see Worksheet#add_chart # @see Chart#add_series class BarSeries < Series - # The data for this series. # @return [NumDataSource] attr_reader :data @@ -88,7 +87,5 @@ module Axlsx # assigns the labels for this series def labels=(v) DataTypeValidator.validate "Series.labels", [AxDataSource], v; @labels = v; end - end - end diff --git a/lib/axlsx/drawing/bubble_chart.rb b/lib/axlsx/drawing/bubble_chart.rb index 3f9745f1..9d0f3ff1 100644 --- a/lib/axlsx/drawing/bubble_chart.rb +++ b/lib/axlsx/drawing/bubble_chart.rb @@ -1,11 +1,9 @@ module Axlsx - # The BubbleChart allows you to insert a bubble chart into your worksheet # @see Worksheet#add_chart # @see Chart#add_series # @see README for an example class BubbleChart < Chart - include Axlsx::OptionsParser # the x value axis diff --git a/lib/axlsx/drawing/bubble_series.rb b/lib/axlsx/drawing/bubble_series.rb index 4fdf86ad..7d6e7bf6 100644 --- a/lib/axlsx/drawing/bubble_series.rb +++ b/lib/axlsx/drawing/bubble_series.rb @@ -1,12 +1,10 @@ module Axlsx - # A BubbleSeries defines the x/y position and bubble size of data in the chart # @note The recommended way to manage series is to use Chart#add_series # @see Worksheet#add_chart # @see Chart#add_series # @see examples/example.rb class BubbleSeries < Series - # The x data for this series. # @return [AxDataSource] attr_reader :xData diff --git a/lib/axlsx/drawing/cat_axis.rb b/lib/axlsx/drawing/cat_axis.rb index 6e61d336..925d6ad6 100644 --- a/lib/axlsx/drawing/cat_axis.rb +++ b/lib/axlsx/drawing/cat_axis.rb @@ -1,7 +1,6 @@ module Axlsx #A CatAxis object defines a chart category axis class CatAxis < Axis - # Creates a new CatAxis object # @option options [Integer] tick_lbl_skip # @option options [Integer] tick_mark_skip @@ -77,7 +76,5 @@ module Axlsx str << ('<c:tickMarkSkip val="' << @tick_mark_skip.to_s << '"/>') str << '</c:catAx>' end - end - end diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb index 45a9113d..49c72b58 100644 --- a/lib/axlsx/drawing/chart.rb +++ b/lib/axlsx/drawing/chart.rb @@ -1,10 +1,8 @@ module Axlsx - # A Chart is the superclass for specific charts # @note Worksheet#add_chart is the recommended way to create charts for your worksheets. # @see README for examples class Chart - include Axlsx::OptionsParser # Creates a new chart object # @param [GraphicalFrame] frame The frame that holds this chart. @@ -292,7 +290,5 @@ module Axlsx # sets the view_3D object for the chart def view_3D=(v) DataTypeValidator.validate "#{self.class}.view_3D", View3D, v; @view_3D = v; end alias :view3D= :view_3D= - end - end diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb index 8623fd8a..fe204ddc 100644 --- a/lib/axlsx/drawing/d_lbls.rb +++ b/lib/axlsx/drawing/d_lbls.rb @@ -5,7 +5,6 @@ module Axlsx #The DLbls class manages serialization of data labels # showLeaderLines and leaderLines are not currently implemented class DLbls - include Axlsx::Accessors include Axlsx::OptionsParser # creates a new DLbls object @@ -84,6 +83,5 @@ module Axlsx @d_lbl_pos = nil @show_leader_lines = nil end - end end diff --git a/lib/axlsx/drawing/drawing.rb b/lib/axlsx/drawing/drawing.rb index 87937d72..0de5dc15 100644 --- a/lib/axlsx/drawing/drawing.rb +++ b/lib/axlsx/drawing/drawing.rb @@ -57,7 +57,6 @@ module Axlsx # @see Chart # see examples/example.rb for an example of how to create a chart. class Drawing - # The worksheet that owns the drawing # @return [Worksheet] attr_reader :worksheet @@ -160,6 +159,5 @@ module Axlsx anchors.each { |anchor| anchor.to_xml_string(str) } str << '</xdr:wsDr>' end - end end diff --git a/lib/axlsx/drawing/graphic_frame.rb b/lib/axlsx/drawing/graphic_frame.rb index 93216e79..006b3b0f 100644 --- a/lib/axlsx/drawing/graphic_frame.rb +++ b/lib/axlsx/drawing/graphic_frame.rb @@ -3,7 +3,6 @@ module Axlsx # @note The recommended way to manage charts is Worksheet#add_chart # @see Worksheet#add_chart class GraphicFrame - # A reference to the chart object associated with this frame # @return [Chart] attr_reader :chart @@ -48,6 +47,5 @@ module Axlsx str << '</a:graphic>' str << '</xdr:graphicFrame>' end - end end diff --git a/lib/axlsx/drawing/hyperlink.rb b/lib/axlsx/drawing/hyperlink.rb index 407e701c..9ff9ee4a 100644 --- a/lib/axlsx/drawing/hyperlink.rb +++ b/lib/axlsx/drawing/hyperlink.rb @@ -3,7 +3,6 @@ module Axlsx # @note using the hyperlink option when calling add_image on a drawing object is the recommended way to manage hyperlinks # @see {file:README} README class Hyperlink - include Axlsx::SerializedAttributes include Axlsx::OptionsParser @@ -94,6 +93,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag 'a:hlinkClick', str, {:'r:id' => relationship.Id, :'xmlns:r' => XML_NS_R } end - end end diff --git a/lib/axlsx/drawing/line_3D_chart.rb b/lib/axlsx/drawing/line_3D_chart.rb index 8816d2e7..da62851f 100644 --- a/lib/axlsx/drawing/line_3D_chart.rb +++ b/lib/axlsx/drawing/line_3D_chart.rb @@ -1,5 +1,4 @@ module Axlsx - # The Line3DChart is a three dimentional line chart (who would have guessed?) that you can add to your worksheet. # @example Creating a chart # # This example creates a line in a single sheet. @@ -19,7 +18,6 @@ module Axlsx # @see Series # @see Package#serialize class Line3DChart < Axlsx::LineChart - # space between bar or column clusters, as a percentage of the bar or column width. # @return [String] attr_reader :gap_depth diff --git a/lib/axlsx/drawing/line_chart.rb b/lib/axlsx/drawing/line_chart.rb index dd0517cb..a1734dea 100644 --- a/lib/axlsx/drawing/line_chart.rb +++ b/lib/axlsx/drawing/line_chart.rb @@ -1,5 +1,4 @@ module Axlsx - # The LineChart is a two dimentional line chart (who would have guessed?) that you can add to your worksheet. # @example Creating a chart # # This example creates a line in a single sheet. @@ -19,7 +18,6 @@ module Axlsx # @see Series # @see Package#serialize class LineChart < Chart - # the category axis # @return [CatAxis] def cat_axis diff --git a/lib/axlsx/drawing/line_series.rb b/lib/axlsx/drawing/line_series.rb index e3c1fa90..2ef18484 100644 --- a/lib/axlsx/drawing/line_series.rb +++ b/lib/axlsx/drawing/line_series.rb @@ -4,7 +4,6 @@ module Axlsx # @see Worksheet#add_chart # @see Chart#add_series class LineSeries < Series - # The data for this series. # @return [ValAxisData] attr_reader :data @@ -104,6 +103,5 @@ module Axlsx # assigns the labels for this series def labels=(v) DataTypeValidator.validate "Series.labels", [AxDataSource], v; @labels = v; end - end end diff --git a/lib/axlsx/drawing/marker.rb b/lib/axlsx/drawing/marker.rb index 94125143..53a52dd1 100644 --- a/lib/axlsx/drawing/marker.rb +++ b/lib/axlsx/drawing/marker.rb @@ -3,7 +3,6 @@ module Axlsx # @note The recommended way to manage markers is Worksheet#add_chart Markers are created for a two cell anchor based on the :start and :end options. # @see Worksheet#add_chart class Marker - include Axlsx::OptionsParser # Creates a new Marker object @@ -77,7 +76,5 @@ module Axlsx end [x, y] end - end - end diff --git a/lib/axlsx/drawing/num_data.rb b/lib/axlsx/drawing/num_data.rb index 27929ee3..9374dac3 100644 --- a/lib/axlsx/drawing/num_data.rb +++ b/lib/axlsx/drawing/num_data.rb @@ -1,8 +1,6 @@ module Axlsx - #This class specifies data for a particular data point. It is used for both numCache and numLit object class NumData - include Axlsx::OptionsParser # creates a new NumVal object @@ -45,7 +43,5 @@ module Axlsx end str << ('</c:' << @tag_name.to_s << '>') end - end - end diff --git a/lib/axlsx/drawing/num_data_source.rb b/lib/axlsx/drawing/num_data_source.rb index 87caac2a..bf5ad9ad 100644 --- a/lib/axlsx/drawing/num_data_source.rb +++ b/lib/axlsx/drawing/num_data_source.rb @@ -1,8 +1,6 @@ module Axlsx - # A numeric data source for use by charts. class NumDataSource - include Axlsx::OptionsParser # creates a new NumDataSource object diff --git a/lib/axlsx/drawing/num_val.rb b/lib/axlsx/drawing/num_val.rb index 3b795f21..113fe865 100644 --- a/lib/axlsx/drawing/num_val.rb +++ b/lib/axlsx/drawing/num_val.rb @@ -1,8 +1,6 @@ module Axlsx - #This class specifies data for a particular data point. class NumVal < StrVal - # A string representing the format code to apply. # For more information see see the SpreadsheetML numFmt element's (§18.8.30) formatCode attribute. # @return [String] diff --git a/lib/axlsx/drawing/one_cell_anchor.rb b/lib/axlsx/drawing/one_cell_anchor.rb index 01767574..c17f4a25 100644 --- a/lib/axlsx/drawing/one_cell_anchor.rb +++ b/lib/axlsx/drawing/one_cell_anchor.rb @@ -4,7 +4,6 @@ module Axlsx # @see Worksheet#add_chart # @see Worksheet#add_image class OneCellAnchor - include Axlsx::OptionsParser # Creates a new OneCellAnchor object and an Pic associated with it. @@ -94,6 +93,5 @@ module Axlsx cx = @width * 914400 / 96 {:cy=>cy, :cx=>cx} end - end end diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 385819cb..869dde4a 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -3,7 +3,6 @@ module Axlsx # Worksheet#add_image is the recommended way to manage images in your sheets # @see Worksheet#add_image class Pic - include Axlsx::OptionsParser # Creates a new Pic(ture) object diff --git a/lib/axlsx/drawing/picture_locking.rb b/lib/axlsx/drawing/picture_locking.rb index a9cb5032..e230ec89 100644 --- a/lib/axlsx/drawing/picture_locking.rb +++ b/lib/axlsx/drawing/picture_locking.rb @@ -1,7 +1,6 @@ module Axlsx # The picture locking class defines the locking properties for pictures in your workbook. class PictureLocking - include Axlsx::OptionsParser include Axlsx::SerializedAttributes include Axlsx::Accessors @@ -36,6 +35,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('a:picLocks', str) end - end end diff --git a/lib/axlsx/drawing/pie_3D_chart.rb b/lib/axlsx/drawing/pie_3D_chart.rb index e06e8d57..5c2b57ac 100644 --- a/lib/axlsx/drawing/pie_3D_chart.rb +++ b/lib/axlsx/drawing/pie_3D_chart.rb @@ -1,11 +1,9 @@ module Axlsx - # The Pie3DChart is a three dimentional piechart (who would have guessed?) that you can add to your worksheet. # @see Worksheet#add_chart # @see Chart#add_series # @see README for an example class Pie3DChart < Chart - # Creates a new pie chart object # @param [GraphicFrame] frame The workbook that owns this chart. # @option options [Cell, String] title @@ -40,6 +38,5 @@ module Axlsx str << '</c:pie3DChart>' end end - end end diff --git a/lib/axlsx/drawing/pie_series.rb b/lib/axlsx/drawing/pie_series.rb index 10755350..4c1b37fb 100644 --- a/lib/axlsx/drawing/pie_series.rb +++ b/lib/axlsx/drawing/pie_series.rb @@ -1,11 +1,9 @@ module Axlsx - # A PieSeries defines the data and labels and explosion for pie charts series. # @note The recommended way to manage series is to use Chart#add_series # @see Worksheet#add_chart # @see Chart#add_series class PieSeries < Series - # The data for this series. # @return [SimpleTypedList] attr_reader :data @@ -67,7 +65,5 @@ module Axlsx # assigns the labels for this series def labels=(v) DataTypeValidator.validate "Series.labels", [AxDataSource], v; @labels = v; end - end - end diff --git a/lib/axlsx/drawing/scaling.rb b/lib/axlsx/drawing/scaling.rb index 9d1ed53e..82811c11 100644 --- a/lib/axlsx/drawing/scaling.rb +++ b/lib/axlsx/drawing/scaling.rb @@ -1,7 +1,6 @@ module Axlsx # The Scaling class defines axis scaling class Scaling - include Axlsx::OptionsParser # creates a new Scaling object @@ -54,6 +53,5 @@ module Axlsx str << ('<c:max val="' << @max.to_s << '"/>') unless @max.nil? str << '</c:scaling>' end - end end diff --git a/lib/axlsx/drawing/scatter_chart.rb b/lib/axlsx/drawing/scatter_chart.rb index 2050cb33..fd6fa3d7 100644 --- a/lib/axlsx/drawing/scatter_chart.rb +++ b/lib/axlsx/drawing/scatter_chart.rb @@ -1,11 +1,9 @@ module Axlsx - # The ScatterChart allows you to insert a scatter chart into your worksheet # @see Worksheet#add_chart # @see Chart#add_series # @see README for an example class ScatterChart < Chart - include Axlsx::OptionsParser # The Style for the scatter chart diff --git a/lib/axlsx/drawing/scatter_series.rb b/lib/axlsx/drawing/scatter_series.rb index 6b65a07b..dba1fdf5 100644 --- a/lib/axlsx/drawing/scatter_series.rb +++ b/lib/axlsx/drawing/scatter_series.rb @@ -1,12 +1,10 @@ module Axlsx - # A ScatterSeries defines the x and y position of data in the chart # @note The recommended way to manage series is to use Chart#add_series # @see Worksheet#add_chart # @see Chart#add_series # @see examples/example.rb class ScatterSeries < Series - # The x data for this series. # @return [NamedAxisData] attr_reader :xData diff --git a/lib/axlsx/drawing/ser_axis.rb b/lib/axlsx/drawing/ser_axis.rb index 805e4244..f1da6037 100644 --- a/lib/axlsx/drawing/ser_axis.rb +++ b/lib/axlsx/drawing/ser_axis.rb @@ -1,7 +1,6 @@ module Axlsx #A SerAxis object defines a series axis class SerAxis < Axis - # The number of tick lables to skip between labels # @return [Integer] attr_reader :tick_lbl_skip @@ -39,5 +38,4 @@ module Axlsx str << '</c:serAx>' end end - end diff --git a/lib/axlsx/drawing/series.rb b/lib/axlsx/drawing/series.rb index 9404b959..e2445bc9 100644 --- a/lib/axlsx/drawing/series.rb +++ b/lib/axlsx/drawing/series.rb @@ -4,7 +4,6 @@ module Axlsx # @see Worksheet#add_chart # @see Chart#add_series class Series - include Axlsx::OptionsParser # The chart that owns this series diff --git a/lib/axlsx/drawing/series_title.rb b/lib/axlsx/drawing/series_title.rb index 4f58ef4a..f18be178 100644 --- a/lib/axlsx/drawing/series_title.rb +++ b/lib/axlsx/drawing/series_title.rb @@ -1,7 +1,6 @@ module Axlsx # A series title is a Title with a slightly different serialization than chart titles. class SeriesTitle < Title - # Serializes the object # @param [String] str # @return [String] diff --git a/lib/axlsx/drawing/str_data.rb b/lib/axlsx/drawing/str_data.rb index 297986d1..e4f94e89 100644 --- a/lib/axlsx/drawing/str_data.rb +++ b/lib/axlsx/drawing/str_data.rb @@ -1,9 +1,7 @@ module Axlsx - #This specifies the last string data used for a chart. (e.g. strLit and strCache) # This class is extended for NumData to include the formatCode attribute required for numLit and numCache class StrData - include Axlsx::OptionsParser # creates a new StrVal object @@ -35,7 +33,5 @@ module Axlsx end str << ('</c:' << @tag_name.to_s << '>') end - end - end diff --git a/lib/axlsx/drawing/str_val.rb b/lib/axlsx/drawing/str_val.rb index 00152bef..26f12e26 100644 --- a/lib/axlsx/drawing/str_val.rb +++ b/lib/axlsx/drawing/str_val.rb @@ -1,8 +1,6 @@ module Axlsx - #This class specifies data for a particular data point. class StrVal - include Axlsx::OptionsParser # creates a new StrVal object diff --git a/lib/axlsx/drawing/title.rb b/lib/axlsx/drawing/title.rb index f62422f9..0c613e13 100644 --- a/lib/axlsx/drawing/title.rb +++ b/lib/axlsx/drawing/title.rb @@ -1,7 +1,6 @@ module Axlsx # A Title stores information about the title of a chart class Title - # The text to be shown. Setting this property directly with a string will remove the cell reference. # @return [String] attr_reader :text @@ -101,6 +100,5 @@ module Axlsx str << '<c:overlay val="0"/>' str << '</c:title>' end - end end diff --git a/lib/axlsx/drawing/two_cell_anchor.rb b/lib/axlsx/drawing/two_cell_anchor.rb index 81a5ca93..aa38c3db 100644 --- a/lib/axlsx/drawing/two_cell_anchor.rb +++ b/lib/axlsx/drawing/two_cell_anchor.rb @@ -3,7 +3,6 @@ module Axlsx # @note The recommended way to manage drawings and charts is Worksheet#add_chart. Anchors are specified by the :start_at and :end_at options to that method. # @see Worksheet#add_chart class TwoCellAnchor - include Axlsx::OptionsParser # A marker that defines the from cell anchor. The default from column and row are 0 and 0 respectively diff --git a/lib/axlsx/drawing/val_axis.rb b/lib/axlsx/drawing/val_axis.rb index b205e1c8..ead09ff8 100644 --- a/lib/axlsx/drawing/val_axis.rb +++ b/lib/axlsx/drawing/val_axis.rb @@ -1,7 +1,6 @@ module Axlsx # the ValAxis class defines a chart value axis. class ValAxis < Axis - # This element specifies how the value axis crosses the category axis. # must be one of [:between, :midCat] # @return [Symbol] @@ -31,6 +30,5 @@ module Axlsx str << ('<c:crossBetween val="' << @cross_between.to_s << '"/>') str << '</c:valAx>' end - end end diff --git a/lib/axlsx/drawing/view_3D.rb b/lib/axlsx/drawing/view_3D.rb index ab959c87..250f53f2 100644 --- a/lib/axlsx/drawing/view_3D.rb +++ b/lib/axlsx/drawing/view_3D.rb @@ -1,7 +1,6 @@ module Axlsx # 3D attributes for a chart. class View3D - include Axlsx::OptionsParser # Creates a new View3D for charts diff --git a/lib/axlsx/drawing/vml_drawing.rb b/lib/axlsx/drawing/vml_drawing.rb index ac39c63d..ccf3e421 100644 --- a/lib/axlsx/drawing/vml_drawing.rb +++ b/lib/axlsx/drawing/vml_drawing.rb @@ -1,8 +1,6 @@ module Axlsx - # a vml drawing used for comments in excel. class VmlDrawing - # creates a new Vml Drawing object. # @param [Comments] comments the comments object this drawing is associated with def initialize(comments) @@ -35,8 +33,6 @@ module Axlsx BAD_PROGRAMMER @comments.each { |comment| comment.vml_shape.to_xml_string str } str << "</xml>" - end - end end diff --git a/lib/axlsx/drawing/vml_shape.rb b/lib/axlsx/drawing/vml_shape.rb index 21cac911..951cd58d 100644 --- a/lib/axlsx/drawing/vml_shape.rb +++ b/lib/axlsx/drawing/vml_shape.rb @@ -1,8 +1,6 @@ module Axlsx - # A VmlShape is used to position and render a comment. class VmlShape - include Axlsx::OptionsParser include Axlsx::Accessors @@ -60,7 +58,6 @@ str << <<SHAME_ON_YOU </x:ClientData> </v:shape> SHAME_ON_YOU - end end end diff --git a/lib/axlsx/rels/relationship.rb b/lib/axlsx/rels/relationship.rb index f5bda412..f1759649 100644 --- a/lib/axlsx/rels/relationship.rb +++ b/lib/axlsx/rels/relationship.rb @@ -2,7 +2,6 @@ module Axlsx # A relationship defines a reference between package parts. # @note Packages automatically manage relationships. class Relationship - class << self # Keeps track of relationship ids in use. # @return [Array] @@ -124,6 +123,5 @@ module Axlsx key << self.Target if self.TargetMode == :External key end - end end diff --git a/lib/axlsx/rels/relationships.rb b/lib/axlsx/rels/relationships.rb index 5e542e2c..8f3b62cc 100644 --- a/lib/axlsx/rels/relationships.rb +++ b/lib/axlsx/rels/relationships.rb @@ -4,7 +4,6 @@ require 'axlsx/rels/relationship.rb' # Relationships are a collection of Relations that define how package parts are related. # @note The package automatically manages releationships. class Relationships < SimpleTypedList - # Creates a new Relationships collection based on SimpleTypedList def initialize super Relationship @@ -26,6 +25,5 @@ require 'axlsx/rels/relationship.rb' each{ |rel| rel.to_xml_string(str) } str << '</Relationships>' end - end end diff --git a/lib/axlsx/stylesheet/border.rb b/lib/axlsx/stylesheet/border.rb index bf342c7f..b9ff785b 100644 --- a/lib/axlsx/stylesheet/border.rb +++ b/lib/axlsx/stylesheet/border.rb @@ -1,7 +1,6 @@ module Axlsx # This class details a border used in Office Open XML spreadsheet styles. class Border - include Axlsx::SerializedAttributes include Axlsx::OptionsParser @@ -67,6 +66,5 @@ module Axlsx end str << '</border>' end - end end diff --git a/lib/axlsx/stylesheet/border_pr.rb b/lib/axlsx/stylesheet/border_pr.rb index 7c32af13..630cf42e 100644 --- a/lib/axlsx/stylesheet/border_pr.rb +++ b/lib/axlsx/stylesheet/border_pr.rb @@ -65,6 +65,5 @@ module Axlsx @color.to_xml_string(str) if @color.is_a?(Color) str << ('</' << @name.to_s << '>') end - end end diff --git a/lib/axlsx/stylesheet/cell_alignment.rb b/lib/axlsx/stylesheet/cell_alignment.rb index 45fe0e7d..cf03c171 100644 --- a/lib/axlsx/stylesheet/cell_alignment.rb +++ b/lib/axlsx/stylesheet/cell_alignment.rb @@ -1,10 +1,8 @@ module Axlsx - # CellAlignment stores information about the cell alignment of a style Xf Object. # @note Using Styles#add_style is the recommended way to manage cell alignment. # @see Styles#add_style class CellAlignment - include Axlsx::SerializedAttributes include Axlsx::OptionsParser @@ -122,6 +120,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('alignment', str) end - end end diff --git a/lib/axlsx/stylesheet/cell_protection.rb b/lib/axlsx/stylesheet/cell_protection.rb index 94648de3..6d98ff19 100644 --- a/lib/axlsx/stylesheet/cell_protection.rb +++ b/lib/axlsx/stylesheet/cell_protection.rb @@ -3,7 +3,6 @@ module Axlsx # @note Using Styles#add_style is the recommended way to manage cell protection. # @see Styles#add_style class CellProtection - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -35,6 +34,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('protection', str) end - end end diff --git a/lib/axlsx/stylesheet/cell_style.rb b/lib/axlsx/stylesheet/cell_style.rb index 9297e243..e2c3a09e 100644 --- a/lib/axlsx/stylesheet/cell_style.rb +++ b/lib/axlsx/stylesheet/cell_style.rb @@ -3,7 +3,6 @@ module Axlsx # @note Using Styles#add_style is the recommended way to manage cell styling. # @see Styles#add_style class CellStyle - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -65,7 +64,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('cellStyle', str) end - end - end diff --git a/lib/axlsx/stylesheet/color.rb b/lib/axlsx/stylesheet/color.rb index e4051e96..709d22c3 100644 --- a/lib/axlsx/stylesheet/color.rb +++ b/lib/axlsx/stylesheet/color.rb @@ -1,7 +1,6 @@ module Axlsx # The color class represents a color used for borders, fills an fonts class Color - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/stylesheet/dxf.rb b/lib/axlsx/stylesheet/dxf.rb index b5423b2a..637e3d54 100644 --- a/lib/axlsx/stylesheet/dxf.rb +++ b/lib/axlsx/stylesheet/dxf.rb @@ -2,7 +2,6 @@ module Axlsx # The Dxf class defines an incremental formatting record for use in Styles. The recommended way to manage styles for your workbook is with Styles#add_style # @see Styles#add_style class Dxf - include Axlsx::OptionsParser # The order in which the child elements is put in the XML seems to @@ -72,7 +71,5 @@ module Axlsx end str << '</dxf>' end - end - end diff --git a/lib/axlsx/stylesheet/fill.rb b/lib/axlsx/stylesheet/fill.rb index 9b124e8d..aeff4867 100644 --- a/lib/axlsx/stylesheet/fill.rb +++ b/lib/axlsx/stylesheet/fill.rb @@ -5,7 +5,6 @@ module Axlsx # @see PatternFill # @see GradientFill class Fill - # The type of fill # @return [PatternFill, GradientFill] attr_reader :fill_type @@ -28,6 +27,5 @@ module Axlsx # @see fill_type def fill_type=(v) DataTypeValidator.validate "Fill.fill_type", [PatternFill, GradientFill], v; @fill_type = v; end - end end diff --git a/lib/axlsx/stylesheet/gradient_fill.rb b/lib/axlsx/stylesheet/gradient_fill.rb index 46098b53..8d88f373 100644 --- a/lib/axlsx/stylesheet/gradient_fill.rb +++ b/lib/axlsx/stylesheet/gradient_fill.rb @@ -2,7 +2,6 @@ module Axlsx # A GradientFill defines the color and positioning for gradiant cell fill. # @see Open Office XML Part 1 §18.8.24 class GradientFill - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/stylesheet/num_fmt.rb b/lib/axlsx/stylesheet/num_fmt.rb index 3f99d8d4..ed239dfc 100644 --- a/lib/axlsx/stylesheet/num_fmt.rb +++ b/lib/axlsx/stylesheet/num_fmt.rb @@ -2,7 +2,6 @@ module Axlsx # A NumFmt object defines an identifier and formatting code for data in cells. # @note The recommended way to manage styles is Styles#add_style class NumFmt - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -80,6 +79,5 @@ module Axlsx end str end - end end diff --git a/lib/axlsx/stylesheet/pattern_fill.rb b/lib/axlsx/stylesheet/pattern_fill.rb index 96614ecd..0bcef74b 100644 --- a/lib/axlsx/stylesheet/pattern_fill.rb +++ b/lib/axlsx/stylesheet/pattern_fill.rb @@ -3,7 +3,6 @@ module Axlsx # @note The recommended way to manage styles is with Styles#add_style # @see Style#add_style class PatternFill - include Axlsx::OptionsParser # Creates a new PatternFill Object # @option options [Symbol] patternType diff --git a/lib/axlsx/stylesheet/table_style.rb b/lib/axlsx/stylesheet/table_style.rb index 6be6a9a2..edef6216 100644 --- a/lib/axlsx/stylesheet/table_style.rb +++ b/lib/axlsx/stylesheet/table_style.rb @@ -2,7 +2,6 @@ module Axlsx # A single table style definition and is a collection for tableStyleElements # @note Table are not supported in this version and only the defaults required for a valid workbook are created. class TableStyle < SimpleTypedList - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -48,6 +47,5 @@ module Axlsx each { |table_style_el| table_style_el.to_xml_string(str) } str << '</tableStyle>' end - end end diff --git a/lib/axlsx/stylesheet/table_style_element.rb b/lib/axlsx/stylesheet/table_style_element.rb index 1b7b3db9..4bc2a787 100644 --- a/lib/axlsx/stylesheet/table_style_element.rb +++ b/lib/axlsx/stylesheet/table_style_element.rb @@ -2,7 +2,6 @@ module Axlsx # an element of style that belongs to a table style. # @note tables and table styles are not supported in this version. This class exists in preparation for that support. class TableStyleElement - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -71,6 +70,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('tableStyleElement', str) end - end end diff --git a/lib/axlsx/stylesheet/table_styles.rb b/lib/axlsx/stylesheet/table_styles.rb index d10e9b05..27c75609 100644 --- a/lib/axlsx/stylesheet/table_styles.rb +++ b/lib/axlsx/stylesheet/table_styles.rb @@ -2,7 +2,6 @@ module Axlsx # TableStyles represents a collection of style definitions for table styles and pivot table styles. # @note Support for custom table styles does not exist in this version. Many of the classes required are defined in preparation for future release. Please do not attempt to add custom table styles. class TableStyles < SimpleTypedList - include Axlsx::SerializedAttributes # Creates a new TableStyles object that is a container for TableStyle objects @@ -39,7 +38,5 @@ module Axlsx each { |table_style| table_style.to_xml_string(str) } str << '</tableStyles>' end - end - end diff --git a/lib/axlsx/stylesheet/xf.rb b/lib/axlsx/stylesheet/xf.rb index 13abf4f2..8b3b11b6 100644 --- a/lib/axlsx/stylesheet/xf.rb +++ b/lib/axlsx/stylesheet/xf.rb @@ -140,6 +140,5 @@ module Axlsx protection.to_xml_string(str) if self.protection str << '</xf>' end - end end diff --git a/lib/axlsx/util/accessors.rb b/lib/axlsx/util/accessors.rb index d49255be..8f481e37 100644 --- a/lib/axlsx/util/accessors.rb +++ b/lib/axlsx/util/accessors.rb @@ -14,7 +14,6 @@ module Axlsx # Defines the class level xxx_attr_accessor methods module ClassMethods - # Creates one or more string validated attr_accessors # @param [Array] symbols An array of symbols representing the # names of the attributes you will add to your class. diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb index 7e26c478..401db1b8 100644 --- a/lib/axlsx/util/constants.rb +++ b/lib/axlsx/util/constants.rb @@ -1,5 +1,4 @@ module Axlsx - # XML Encoding ENCODING = "UTF-8".freeze diff --git a/lib/axlsx/util/options_parser.rb b/lib/axlsx/util/options_parser.rb index 9b6d1766..01a1b29b 100644 --- a/lib/axlsx/util/options_parser.rb +++ b/lib/axlsx/util/options_parser.rb @@ -2,7 +2,6 @@ module Axlsx # This module defines a single method for parsing options in class # initializers. module OptionsParser - # Parses an options hash by calling any defined method by the same # name of the key postfixed with an '=' # @param [Hash] options Options to parse. diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index 75712de1..2ac5c05f 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -2,7 +2,6 @@ module Axlsx # This module allows us to define a list of symbols defining which # attributes will be serialized for a class. module SerializedAttributes - # Extend with class methods def self.included(base) base.send :extend, ClassMethods @@ -10,7 +9,6 @@ module Axlsx # class methods applied to all includers module ClassMethods - # This is the method to be used in inheriting classes to specify # which of the instance values are serializable def serializable_attributes(*symbols) diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb index 98c67d6b..ddab916e 100644 --- a/lib/axlsx/util/simple_typed_list.rb +++ b/lib/axlsx/util/simple_typed_list.rb @@ -1,5 +1,4 @@ module Axlsx - # A SimpleTypedList is a type restrictive collection that allows some of the methods from Array and supports basic xml serialization. # @private class SimpleTypedList @@ -170,7 +169,5 @@ module Axlsx each { |item| item.to_xml_string(str) } str << ('</' << el_name << '>') end - end - end diff --git a/lib/axlsx/util/storage.rb b/lib/axlsx/util/storage.rb index dc6cc491..9712c563 100644 --- a/lib/axlsx/util/storage.rb +++ b/lib/axlsx/util/storage.rb @@ -1,8 +1,6 @@ module Axlsx - # The Storage class represents a storage object or stream in a compound file. class Storage - # Packing for the Storage when pushing an array of items into a byte stream # Name, name length, type, color, left sibling, right sibling, child, classid, state, created, modified, sector, size PACKING = "s32 s1 c2 l3 x16 x4 q2 l q".freeze @@ -140,6 +138,5 @@ module Axlsx @type ||= (data.nil? ? TYPES[:storage] : TYPES[:stream]) self.name = name end - end end diff --git a/lib/axlsx/util/zip_command.rb b/lib/axlsx/util/zip_command.rb index e83b44b0..23fd7cf6 100644 --- a/lib/axlsx/util/zip_command.rb +++ b/lib/axlsx/util/zip_command.rb @@ -2,7 +2,6 @@ require 'open3' require 'shellwords' module Axlsx - # The ZipCommand class supports zipping the Excel file contents using # a binary zip program instead of RubyZip's `Zip::OutputStream`. # diff --git a/lib/axlsx/version.rb b/lib/axlsx/version.rb index 2fda2686..cf70e2e9 100644 --- a/lib/axlsx/version.rb +++ b/lib/axlsx/version.rb @@ -1,5 +1,4 @@ module Axlsx - # The current version VERSION = "3.3.0" end diff --git a/lib/axlsx/workbook/defined_names.rb b/lib/axlsx/workbook/defined_names.rb index abe8197a..30f80fcb 100644 --- a/lib/axlsx/workbook/defined_names.rb +++ b/lib/axlsx/workbook/defined_names.rb @@ -1,7 +1,6 @@ module Axlsx # a simple types list of DefinedName objects class DefinedNames < SimpleTypedList - # creates the DefinedNames object def initialize super DefinedName diff --git a/lib/axlsx/workbook/shared_strings_table.rb b/lib/axlsx/workbook/shared_strings_table.rb index bae33d9a..55040bc5 100644 --- a/lib/axlsx/workbook/shared_strings_table.rb +++ b/lib/axlsx/workbook/shared_strings_table.rb @@ -1,5 +1,4 @@ module Axlsx - # The Shared String Table class is responsible for managing and serializing common strings in a workbook. # While the ECMA-376 spec allows for both inline and shared strings it seems that at least some applications like iWorks Numbers # and Google Docs require that the shared string table is populated in order to interoperate properly. @@ -8,7 +7,6 @@ module Axlsx # @note Serialization performance is affected by using this serialization method so if you do not need interoperability # it is recomended that you use the default inline string method of serialization. class SharedStringsTable - # The total number of strings in the workbook including duplicates # Empty cells are treated as blank strings # @return [Integer] diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index deb42d86..f2d9eab5 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -82,7 +82,6 @@ require 'axlsx/workbook/worksheet/selection.rb' # # *workbookPr is only supported to the extend of date1904 class Workbook - BOLD_FONT_MULTIPLIER = 1.5 FONT_SCALE_DIVISOR = 10.0 @@ -413,6 +412,5 @@ require 'axlsx/workbook/worksheet/selection.rb' end str << '</workbook>' end - end end diff --git a/lib/axlsx/workbook/workbook_view.rb b/lib/axlsx/workbook/workbook_view.rb index 2476ad84..b2656d00 100644 --- a/lib/axlsx/workbook/workbook_view.rb +++ b/lib/axlsx/workbook/workbook_view.rb @@ -19,14 +19,12 @@ # </xsd:complexType> module Axlsx - # A BookView defines the display properties for a workbook. # Units for window widths and other dimensions are expressed in twips. # Twip measurements are portable between different display resolutions. # The formula is (screen pixels) * (20 * 72) / (logical device dpi), # where the logical device dpi can be different for x and y coordinates. class WorkbookView - include Axlsx::SerializedAttributes include Axlsx::OptionsParser include Axlsx::Accessors diff --git a/lib/axlsx/workbook/workbook_views.rb b/lib/axlsx/workbook/workbook_views.rb index 0a059e8a..025d083b 100644 --- a/lib/axlsx/workbook/workbook_views.rb +++ b/lib/axlsx/workbook/workbook_views.rb @@ -1,7 +1,6 @@ module Axlsx # a simple types list of BookView objects class WorkbookViews < SimpleTypedList - # creates the book views object def initialize super WorkbookView diff --git a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb index e419c0ab..fa0716a2 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb @@ -2,10 +2,8 @@ require 'axlsx/workbook/worksheet/auto_filter/filter_column.rb' require 'axlsx/workbook/worksheet/auto_filter/filters.rb' module Axlsx - #This class represents an auto filter range in a worksheet class AutoFilter - # creates a new Autofilter object # @param [Worksheet] worksheet def initialize(worksheet) @@ -72,6 +70,5 @@ module Axlsx columns.each { |filter_column| filter_column.to_xml_string(str) } str << "</autoFilter>" end - end end diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb index 4816fd55..54d43acf 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb @@ -4,7 +4,6 @@ module Axlsx # If a column in the AutoFilter range has no criteria specified, # then there is no corresponding filterColumn collection expressed for that column. class FilterColumn - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb index 11356c0a..7b503acd 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb @@ -1,5 +1,4 @@ module Axlsx - # When multiple values are chosen to filter by, or when a group of date values are chosen to filter by, # this object groups those criteria together. class Filters @@ -104,7 +103,6 @@ module Axlsx # This class expresses a filter criteria value. class Filter - # Creates a new filter value object # @param [Any] value The value of the filter. This is not restricted, but # will be serialized via to_s so if you are passing an object diff --git a/lib/axlsx/workbook/worksheet/border_creator.rb b/lib/axlsx/workbook/worksheet/border_creator.rb index ef4e5aea..b949a76e 100644 --- a/lib/axlsx/workbook/worksheet/border_creator.rb +++ b/lib/axlsx/workbook/worksheet/border_creator.rb @@ -75,6 +75,5 @@ module Axlsx def last_col @last_col ||= last_cell.scan(/\D+/).first end - end end diff --git a/lib/axlsx/workbook/worksheet/break.rb b/lib/axlsx/workbook/worksheet/break.rb index bf019eeb..a9e5fb11 100644 --- a/lib/axlsx/workbook/worksheet/break.rb +++ b/lib/axlsx/workbook/worksheet/break.rb @@ -1,9 +1,7 @@ module Axlsx - # The Break class stores the details for row and column page breaks. # @see RowBreaks, ColBreaks class Break - include Axlsx::OptionsParser include Axlsx::Accessors include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index 24865b4d..725b1a39 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -6,7 +6,6 @@ module Axlsx # # @see Worksheet#add_row class Cell - include Axlsx::OptionsParser # @param [Row] row The row this cell belongs to. @@ -541,6 +540,5 @@ module Axlsx v.to_s end end - end end diff --git a/lib/axlsx/workbook/worksheet/cell_serializer.rb b/lib/axlsx/workbook/worksheet/cell_serializer.rb index 962b575d..b1ac8207 100644 --- a/lib/axlsx/workbook/worksheet/cell_serializer.rb +++ b/lib/axlsx/workbook/worksheet/cell_serializer.rb @@ -1,5 +1,4 @@ module Axlsx - # The Cell Serializer class contains the logic for serializing cells based on their type. class CellSerializer class << self diff --git a/lib/axlsx/workbook/worksheet/cfvo.rb b/lib/axlsx/workbook/worksheet/cfvo.rb index c2a4c781..c9eb8d3d 100644 --- a/lib/axlsx/workbook/worksheet/cfvo.rb +++ b/lib/axlsx/workbook/worksheet/cfvo.rb @@ -7,7 +7,6 @@ module Axlsx # @see ConditionalFormattingRule#initialize # class Cfvo - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/cfvos.rb b/lib/axlsx/workbook/worksheet/cfvos.rb index eb44f9d8..2fc2e65a 100644 --- a/lib/axlsx/workbook/worksheet/cfvos.rb +++ b/lib/axlsx/workbook/worksheet/cfvos.rb @@ -1,9 +1,7 @@ module Axlsx - #A collection of Cfvo objects that initializes with the required #first two items class Cfvos < SimpleTypedList - def initialize super(Cfvo) end diff --git a/lib/axlsx/workbook/worksheet/col.rb b/lib/axlsx/workbook/worksheet/col.rb index 29840c7a..6305b8c9 100644 --- a/lib/axlsx/workbook/worksheet/col.rb +++ b/lib/axlsx/workbook/worksheet/col.rb @@ -1,8 +1,6 @@ module Axlsx - # The Col class defines column attributes for columns in sheets. class Col - # Maximum column width limit in MS Excel is 255 characters # https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 MAX_WIDTH = 255 @@ -139,6 +137,5 @@ module Axlsx def to_xml_string(str = '') serialized_tag('col', str) end - end end diff --git a/lib/axlsx/workbook/worksheet/col_breaks.rb b/lib/axlsx/workbook/worksheet/col_breaks.rb index c803fc70..df7da37b 100644 --- a/lib/axlsx/workbook/worksheet/col_breaks.rb +++ b/lib/axlsx/workbook/worksheet/col_breaks.rb @@ -1,10 +1,8 @@ module Axlsx - # A collection of Brake objects. # Please do not use this class directly. Instead use # Worksheet#add_break class ColBreaks < SimpleTypedList - # Instantiates a new list restricted to Break types def initialize super Break diff --git a/lib/axlsx/workbook/worksheet/color_scale.rb b/lib/axlsx/workbook/worksheet/color_scale.rb index b93240a5..60b0e183 100644 --- a/lib/axlsx/workbook/worksheet/color_scale.rb +++ b/lib/axlsx/workbook/worksheet/color_scale.rb @@ -6,9 +6,7 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule#initialize class ColorScale - class << self - # These are the default conditional formatting value objects # that define a two tone color gradient. def default_cfvos diff --git a/lib/axlsx/workbook/worksheet/cols.rb b/lib/axlsx/workbook/worksheet/cols.rb index c0704343..7d93e603 100644 --- a/lib/axlsx/workbook/worksheet/cols.rb +++ b/lib/axlsx/workbook/worksheet/cols.rb @@ -1,9 +1,7 @@ module Axlsx - # The cols class manages the col object used to manage column widths. # This is where the magic happens with autowidth class Cols < SimpleTypedList - def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) super Col diff --git a/lib/axlsx/workbook/worksheet/comment.rb b/lib/axlsx/workbook/worksheet/comment.rb index 5230c940..9efdb1f0 100644 --- a/lib/axlsx/workbook/worksheet/comment.rb +++ b/lib/axlsx/workbook/worksheet/comment.rb @@ -1,8 +1,6 @@ module Axlsx - # A comment is the text data for a comment class Comment - include Axlsx::OptionsParser include Axlsx::Accessors diff --git a/lib/axlsx/workbook/worksheet/comments.rb b/lib/axlsx/workbook/worksheet/comments.rb index 72281f58..71a58c46 100644 --- a/lib/axlsx/workbook/worksheet/comments.rb +++ b/lib/axlsx/workbook/worksheet/comments.rb @@ -1,8 +1,6 @@ module Axlsx - # Comments is a collection of Comment objects for a worksheet class Comments < SimpleTypedList - # the vml_drawing that holds the shapes for comments # @return [VmlDrawing] attr_reader :vml_drawing @@ -73,9 +71,6 @@ module Axlsx comment.to_xml_string str end str << '</commentList></comments>' - end - end - end diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting.rb b/lib/axlsx/workbook/worksheet/conditional_formatting.rb index 4fe6578d..2ff13682 100644 --- a/lib/axlsx/workbook/worksheet/conditional_formatting.rb +++ b/lib/axlsx/workbook/worksheet/conditional_formatting.rb @@ -5,7 +5,6 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule class ConditionalFormatting - include Axlsx::OptionsParser # Creates a new {ConditionalFormatting} object diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb index 8fa0c5b5..de1c4032 100644 --- a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb +++ b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb @@ -6,7 +6,6 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule#initialize class ConditionalFormattingRule - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/conditional_formattings.rb b/lib/axlsx/workbook/worksheet/conditional_formattings.rb index 23301ff8..ad2e9c97 100644 --- a/lib/axlsx/workbook/worksheet/conditional_formattings.rb +++ b/lib/axlsx/workbook/worksheet/conditional_formattings.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple, self serializing class for storing conditional formattings class ConditionalFormattings < SimpleTypedList - # creates a new Tables object def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) @@ -20,5 +18,4 @@ module Axlsx each { |item| item.to_xml_string(str) } end end - end diff --git a/lib/axlsx/workbook/worksheet/data_bar.rb b/lib/axlsx/workbook/worksheet/data_bar.rb index e6455f1c..c89c421d 100644 --- a/lib/axlsx/workbook/worksheet/data_bar.rb +++ b/lib/axlsx/workbook/worksheet/data_bar.rb @@ -6,7 +6,6 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule#initialize class DataBar - include Axlsx::OptionsParser include Axlsx::SerializedAttributes @@ -124,6 +123,5 @@ module Axlsx end end end - end end diff --git a/lib/axlsx/workbook/worksheet/data_validations.rb b/lib/axlsx/workbook/worksheet/data_validations.rb index 44afadf6..46cebe29 100644 --- a/lib/axlsx/workbook/worksheet/data_validations.rb +++ b/lib/axlsx/workbook/worksheet/data_validations.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple, self serializing class for storing conditional formattings class DataValidations < SimpleTypedList - # creates a new Tables object def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) @@ -22,5 +20,4 @@ module Axlsx str << '</dataValidations>' end end - end diff --git a/lib/axlsx/workbook/worksheet/date_time_converter.rb b/lib/axlsx/workbook/worksheet/date_time_converter.rb index 74199f2d..48d69d94 100644 --- a/lib/axlsx/workbook/worksheet/date_time_converter.rb +++ b/lib/axlsx/workbook/worksheet/date_time_converter.rb @@ -3,7 +3,6 @@ require "date" module Axlsx # The DateTimeConverter class converts both data and time types to their apprpriate excel serializations class DateTimeConverter - # The date_to_serial method converts Date objects to the equivelant excel serialized forms # @param [Date] date the date to be serialized # @return [Numeric] diff --git a/lib/axlsx/workbook/worksheet/dimension.rb b/lib/axlsx/workbook/worksheet/dimension.rb index 48b3a1c2..eaf0d038 100644 --- a/lib/axlsx/workbook/worksheet/dimension.rb +++ b/lib/axlsx/workbook/worksheet/dimension.rb @@ -1,10 +1,8 @@ module Axlsx - # This class manages the dimensions for a worksheet. # While this node is optional in the specification some readers like # LibraOffice require this node to render the sheet class Dimension - # the default value for the first cell in the dimension # @return [String] def self.default_first diff --git a/lib/axlsx/workbook/worksheet/header_footer.rb b/lib/axlsx/workbook/worksheet/header_footer.rb index db684fc9..5ad00565 100644 --- a/lib/axlsx/workbook/worksheet/header_footer.rb +++ b/lib/axlsx/workbook/worksheet/header_footer.rb @@ -9,7 +9,6 @@ module Axlsx # @note The recommended way of managing header/footers is via Worksheet#header_footer # @see Worksheet#initialize class HeaderFooter - include Axlsx::OptionsParser include Axlsx::SerializedAttributes include Axlsx::Accessors diff --git a/lib/axlsx/workbook/worksheet/icon_set.rb b/lib/axlsx/workbook/worksheet/icon_set.rb index 42afaa4d..0042e757 100644 --- a/lib/axlsx/workbook/worksheet/icon_set.rb +++ b/lib/axlsx/workbook/worksheet/icon_set.rb @@ -6,7 +6,6 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule#initialize class IconSet - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/merged_cells.rb b/lib/axlsx/workbook/worksheet/merged_cells.rb index cb5bae93..60d95003 100644 --- a/lib/axlsx/workbook/worksheet/merged_cells.rb +++ b/lib/axlsx/workbook/worksheet/merged_cells.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple list of merged cells class MergedCells < SimpleTypedList - # creates a new MergedCells object # @param [Worksheet] worksheet def initialize(worksheet) diff --git a/lib/axlsx/workbook/worksheet/outline_pr.rb b/lib/axlsx/workbook/worksheet/outline_pr.rb index f25ef4fa..5db0d825 100644 --- a/lib/axlsx/workbook/worksheet/outline_pr.rb +++ b/lib/axlsx/workbook/worksheet/outline_pr.rb @@ -1,5 +1,4 @@ module Axlsx - # The OutlinePr class manages serialization of a worksheet's outlinePr element, which provides various # options to control outlining. class OutlinePr diff --git a/lib/axlsx/workbook/worksheet/page_margins.rb b/lib/axlsx/workbook/worksheet/page_margins.rb index b3f8ddee..2dec65e6 100644 --- a/lib/axlsx/workbook/worksheet/page_margins.rb +++ b/lib/axlsx/workbook/worksheet/page_margins.rb @@ -9,7 +9,6 @@ module Axlsx # @see Worksheet#page_margins # @see Worksheet#initialize class PageMargins - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/page_set_up_pr.rb b/lib/axlsx/workbook/worksheet/page_set_up_pr.rb index 03378a1a..2242f2bc 100644 --- a/lib/axlsx/workbook/worksheet/page_set_up_pr.rb +++ b/lib/axlsx/workbook/worksheet/page_set_up_pr.rb @@ -1,9 +1,7 @@ module Axlsx - # Page setup properties of the worksheet # This class name is not a typo, its spec. class PageSetUpPr - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb index b3117942..6281eb74 100644 --- a/lib/axlsx/workbook/worksheet/page_setup.rb +++ b/lib/axlsx/workbook/worksheet/page_setup.rb @@ -5,7 +5,6 @@ module Axlsx # @see Worksheet#print_options # @see Worksheet#initialize class PageSetup - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/pane.rb b/lib/axlsx/workbook/worksheet/pane.rb index bff08bb5..9acfa14b 100644 --- a/lib/axlsx/workbook/worksheet/pane.rb +++ b/lib/axlsx/workbook/worksheet/pane.rb @@ -4,7 +4,6 @@ module Axlsx # @note The recommended way to manage the pane options is via SheetView#pane # @see SheetView#pane class Pane - include Axlsx::OptionsParser include Axlsx::SerializedAttributes # Creates a new {Pane} object diff --git a/lib/axlsx/workbook/worksheet/pivot_table.rb b/lib/axlsx/workbook/worksheet/pivot_table.rb index 23d9828e..ed51d5cf 100644 --- a/lib/axlsx/workbook/worksheet/pivot_table.rb +++ b/lib/axlsx/workbook/worksheet/pivot_table.rb @@ -3,7 +3,6 @@ module Axlsx # @note Worksheet#add_pivot_table is the recommended way to create tables for your worksheets. # @see README for examples class PivotTable - include Axlsx::OptionsParser # Creates a new PivotTable object diff --git a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb index b0e764ca..2c7c05e4 100644 --- a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb +++ b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb @@ -3,7 +3,6 @@ module Axlsx # @note Worksheet#add_pivot_table is the recommended way to create tables for your worksheets. # @see README for examples class PivotTableCacheDefinition - include Axlsx::OptionsParser # Creates a new PivotTable object @@ -60,6 +59,5 @@ module Axlsx str << '</cacheFields>' str << '</pivotCacheDefinition>' end - end end diff --git a/lib/axlsx/workbook/worksheet/pivot_tables.rb b/lib/axlsx/workbook/worksheet/pivot_tables.rb index 912d9f41..8aaebea2 100644 --- a/lib/axlsx/workbook/worksheet/pivot_tables.rb +++ b/lib/axlsx/workbook/worksheet/pivot_tables.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple, self serializing class for storing pivot tables class PivotTables < SimpleTypedList - # creates a new Tables object def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) @@ -20,5 +18,4 @@ module Axlsx map{ |pivot_table| Relationship.new(pivot_table, PIVOT_TABLE_R, "../#{pivot_table.pn}") } end end - end diff --git a/lib/axlsx/workbook/worksheet/print_options.rb b/lib/axlsx/workbook/worksheet/print_options.rb index e57c2094..7ba52861 100644 --- a/lib/axlsx/workbook/worksheet/print_options.rb +++ b/lib/axlsx/workbook/worksheet/print_options.rb @@ -5,7 +5,6 @@ module Axlsx # @see Worksheet#print_options # @see Worksheet#initialize class PrintOptions - include Axlsx::OptionsParser include Axlsx::SerializedAttributes include Axlsx::Accessors diff --git a/lib/axlsx/workbook/worksheet/protected_range.rb b/lib/axlsx/workbook/worksheet/protected_range.rb index e0da00df..07f9a20c 100644 --- a/lib/axlsx/workbook/worksheet/protected_range.rb +++ b/lib/axlsx/workbook/worksheet/protected_range.rb @@ -3,7 +3,6 @@ module Axlsx # @note the recommended way to manage protected ranges with via Worksheet#protect_range # @see Worksheet#protect_range class ProtectedRange - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/protected_ranges.rb b/lib/axlsx/workbook/worksheet/protected_ranges.rb index d274cf80..d16dbbd6 100644 --- a/lib/axlsx/workbook/worksheet/protected_ranges.rb +++ b/lib/axlsx/workbook/worksheet/protected_ranges.rb @@ -1,9 +1,7 @@ module Axlsx - # A self serializing collection of ranges that should be protected in # the worksheet class ProtectedRanges < SimpleTypedList - attr_reader :worksheet def initialize(worksheet) diff --git a/lib/axlsx/workbook/worksheet/rich_text.rb b/lib/axlsx/workbook/worksheet/rich_text.rb index 81af32b2..e5156047 100644 --- a/lib/axlsx/workbook/worksheet/rich_text.rb +++ b/lib/axlsx/workbook/worksheet/rich_text.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple, self serializing class for storing TextRuns class RichText < SimpleTypedList - # creates a new RichText collection # @param [String] text -optional The text to use in creating the first RichTextRun # @param [Object] options -optional The options to use in creating the first RichTextRun diff --git a/lib/axlsx/workbook/worksheet/rich_text_run.rb b/lib/axlsx/workbook/worksheet/rich_text_run.rb index 89dcd157..44046709 100644 --- a/lib/axlsx/workbook/worksheet/rich_text_run.rb +++ b/lib/axlsx/workbook/worksheet/rich_text_run.rb @@ -1,8 +1,6 @@ module Axlsx - # The RichTextRun class creates and self serializing text run. class RichTextRun - include Axlsx::OptionsParser attr_reader :value diff --git a/lib/axlsx/workbook/worksheet/row.rb b/lib/axlsx/workbook/worksheet/row.rb index ee5b9509..fc044124 100644 --- a/lib/axlsx/workbook/worksheet/row.rb +++ b/lib/axlsx/workbook/worksheet/row.rb @@ -159,5 +159,4 @@ module Axlsx end end end - end diff --git a/lib/axlsx/workbook/worksheet/row_breaks.rb b/lib/axlsx/workbook/worksheet/row_breaks.rb index 0e6e8646..e4cbf4f2 100644 --- a/lib/axlsx/workbook/worksheet/row_breaks.rb +++ b/lib/axlsx/workbook/worksheet/row_breaks.rb @@ -1,9 +1,7 @@ module Axlsx - # A collection of break objects that define row breaks (page breaks) for printing and preview class RowBreaks < SimpleTypedList - def initialize super Break end diff --git a/lib/axlsx/workbook/worksheet/selection.rb b/lib/axlsx/workbook/worksheet/selection.rb index 4c02d286..efa56056 100644 --- a/lib/axlsx/workbook/worksheet/selection.rb +++ b/lib/axlsx/workbook/worksheet/selection.rb @@ -4,7 +4,6 @@ module Axlsx # @note The recommended way to manage the selection pane options is via SheetView#add_selection # @see SheetView#add_selection class Selection - include Axlsx::OptionsParser include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb b/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb index 88ada9ae..b42ecb31 100644 --- a/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb @@ -1,5 +1,4 @@ module Axlsx - # the SheetCalcPr object for the worksheet # This object contains calculation properties for the worksheet. class SheetCalcPr diff --git a/lib/axlsx/workbook/worksheet/sheet_data.rb b/lib/axlsx/workbook/worksheet/sheet_data.rb index 0b697fbb..f245d07c 100644 --- a/lib/axlsx/workbook/worksheet/sheet_data.rb +++ b/lib/axlsx/workbook/worksheet/sheet_data.rb @@ -1,8 +1,6 @@ module Axlsx - # This class manages the serialization of rows for worksheets class SheetData - # Creates a new SheetData object # @param [Worksheet] worksheet The worksheet that owns this sheet data. def initialize(worksheet) @@ -22,6 +20,5 @@ module Axlsx end str << '</sheetData>' end - end end diff --git a/lib/axlsx/workbook/worksheet/sheet_format_pr.rb b/lib/axlsx/workbook/worksheet/sheet_format_pr.rb index e0b981ef..de4c6e16 100644 --- a/lib/axlsx/workbook/worksheet/sheet_format_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_format_pr.rb @@ -1,5 +1,4 @@ module Axlsx - # Sheet formatting properties # <xsd:complexType name="CT_SheetFormatPr"> # <xsd:attribute name="baseColWidth" type="xsd:unsignedInt" use="optional" default="8"/> diff --git a/lib/axlsx/workbook/worksheet/sheet_pr.rb b/lib/axlsx/workbook/worksheet/sheet_pr.rb index e369cb52..6f76b580 100644 --- a/lib/axlsx/workbook/worksheet/sheet_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_pr.rb @@ -1,5 +1,4 @@ module Axlsx - # The SheetPr class manages serialization of a worksheet's sheetPr element. class SheetPr include Axlsx::OptionsParser diff --git a/lib/axlsx/workbook/worksheet/sheet_protection.rb b/lib/axlsx/workbook/worksheet/sheet_protection.rb index d1aaf00c..c921d381 100644 --- a/lib/axlsx/workbook/worksheet/sheet_protection.rb +++ b/lib/axlsx/workbook/worksheet/sheet_protection.rb @@ -1,8 +1,6 @@ module Axlsx - # The SheetProtection object manages worksheet protection options per sheet. class SheetProtection - include Axlsx::OptionsParser include Axlsx::SerializedAttributes include Axlsx::Accessors diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb index 104243ce..17a547ea 100644 --- a/lib/axlsx/workbook/worksheet/sheet_view.rb +++ b/lib/axlsx/workbook/worksheet/sheet_view.rb @@ -4,7 +4,6 @@ module Axlsx # @note The recommended way to manage the sheet view is via Worksheet#sheet_view # @see Worksheet#sheet_view class SheetView - include Axlsx::OptionsParser include Axlsx::Accessors include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/table.rb b/lib/axlsx/workbook/worksheet/table.rb index e660d26c..5053c5fd 100644 --- a/lib/axlsx/workbook/worksheet/table.rb +++ b/lib/axlsx/workbook/worksheet/table.rb @@ -3,7 +3,6 @@ module Axlsx # @note Worksheet#add_table is the recommended way to create tables for your worksheets. # @see README for examples class Table - include Axlsx::OptionsParser # Creates a new Table object diff --git a/lib/axlsx/workbook/worksheet/table_style_info.rb b/lib/axlsx/workbook/worksheet/table_style_info.rb index c4678310..f7b7bff4 100644 --- a/lib/axlsx/workbook/worksheet/table_style_info.rb +++ b/lib/axlsx/workbook/worksheet/table_style_info.rb @@ -1,5 +1,4 @@ module Axlsx - # The table style info class manages style attributes for defined tables in # a worksheet class TableStyleInfo diff --git a/lib/axlsx/workbook/worksheet/tables.rb b/lib/axlsx/workbook/worksheet/tables.rb index d033212c..bf6efe0c 100644 --- a/lib/axlsx/workbook/worksheet/tables.rb +++ b/lib/axlsx/workbook/worksheet/tables.rb @@ -1,8 +1,6 @@ module Axlsx - # A simple, self serializing class for storing tables class Tables < SimpleTypedList - # creates a new Tables object def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) @@ -30,5 +28,4 @@ module Axlsx str << '</tableParts>' end end - end diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index a32bc5b6..c3960af3 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -1,7 +1,6 @@ require_relative "border_creator" module Axlsx - # The Worksheet class represents a worksheet in the workbook. class Worksheet include Axlsx::OptionsParser @@ -831,6 +830,5 @@ module Axlsx return if !auto_filter.range workbook.add_defined_name auto_filter.defined_name, name: '_xlnm._FilterDatabase', local_sheet_id: index, hidden: 1 end - end end diff --git a/lib/axlsx/workbook/worksheet/worksheet_comments.rb b/lib/axlsx/workbook/worksheet/worksheet_comments.rb index e976ad5c..d8aed8e0 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_comments.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_comments.rb @@ -1,9 +1,7 @@ module Axlsx - # A wraper class for comments that defines its on worksheet # serailization class WorksheetComments - # Creates a new WorksheetComments object # param [Worksheet] worksheet The worksheet comments in thes object belong to def initialize(worksheet) diff --git a/lib/axlsx/workbook/worksheet/worksheet_drawing.rb b/lib/axlsx/workbook/worksheet/worksheet_drawing.rb index ae03ac0f..e461ffa9 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_drawing.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_drawing.rb @@ -1,11 +1,9 @@ module Axlsx - # This is a utility class for serialing the drawing node in a # worksheet. Drawing objects have their own serialization that exports # a drawing document. This is only for the single node in the # worksheet class WorksheetDrawing - # Creates a new WorksheetDrawing # @param [Worksheet] worksheet def initialize(worksheet) diff --git a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb index 2a241287..f79bc814 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb @@ -1,8 +1,6 @@ module Axlsx - # A worksheet hyperlink object. Note that this is not the same as a drawing hyperlink object. class WorksheetHyperlink - include Axlsx::OptionsParser include Axlsx::Accessors include Axlsx::SerializedAttributes diff --git a/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb b/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb index a242f0f8..5d5a2186 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb @@ -1,8 +1,6 @@ module Axlsx - #A collection of hyperlink objects for a worksheet class WorksheetHyperlinks < SimpleTypedList - # Creates a new Hyperlinks collection # @param [Worksheet] worksheet the worksheet that owns these hyperlinks def initialize(worksheet) diff --git a/test/content_type/tc_content_type.rb b/test/content_type/tc_content_type.rb index 60fa9c76..278cd67b 100644 --- a/test/content_type/tc_content_type.rb +++ b/test/content_type/tc_content_type.rb @@ -12,7 +12,6 @@ class TestContentType < Test::Unit::TestCase end def test_pre_built_types - o_path = "//xmlns:Override[@ContentType='%s']" d_path = "//xmlns:Default[@ContentType='%s']" @@ -53,7 +52,6 @@ class TestContentType < Test::Unit::TestCase doc = Nokogiri::XML(@package.send(:content_types).to_xml_string) assert_equal(doc.xpath("//xmlns:Override").size, 6, "adding workship should add another type") assert_equal(doc.xpath(o_path % Axlsx::WORKSHEET_CT).last["PartName"], "/xl/#{ws.pn}", "Worksheet part invalid") - end def test_drawings_and_charts_need_content_types @@ -71,5 +69,4 @@ class TestContentType < Test::Unit::TestCase assert_equal(doc.xpath("//xmlns:Override").size, 8, "expected 7 types got #{doc.css("Types Override").size}") assert_equal(doc.xpath(o_path % Axlsx::CHART_CT).last["PartName"], "/xl/#{c.pn}", "Chart part name invlid") end - end diff --git a/test/content_type/tc_default.rb b/test/content_type/tc_default.rb index b6c040ac..77915ea0 100644 --- a/test/content_type/tc_default.rb +++ b/test/content_type/tc_default.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestDefault < Test::Unit::TestCase - def test_content_type_restriction assert_raise(ArgumentError, "raises argument error if invlalid ContentType is") { Axlsx::Default.new :ContentType=>"asdf" } end diff --git a/test/content_type/tc_override.rb b/test/content_type/tc_override.rb index d9bec90c..c21f9f27 100644 --- a/test/content_type/tc_override.rb +++ b/test/content_type/tc_override.rb @@ -1,6 +1,5 @@ require 'tc_helper.rb' class TestOverride < Test::Unit::TestCase - def test_content_type_restriction assert_raise(ArgumentError, "requires known content type") { Axlsx::Override.new :ContentType=>"asdf" } end diff --git a/test/doc_props/tc_app.rb b/test/doc_props/tc_app.rb index 8d8efd4b..7718a6c2 100644 --- a/test/doc_props/tc_app.rb +++ b/test/doc_props/tc_app.rb @@ -29,7 +29,6 @@ class TestApp < Test::Unit::TestCase } @app = Axlsx::App.new options - end def test_valid_document diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb index 0eddfed7..6ba01b5f 100644 --- a/test/doc_props/tc_core.rb +++ b/test/doc_props/tc_core.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestCore < Test::Unit::TestCase - def setup @core = Axlsx::Core.new # could still see some false positives if the second changes between the next two calls diff --git a/test/drawing/tc_area_chart.rb b/test/drawing/tc_area_chart.rb index b3013c12..fc928db9 100644 --- a/test/drawing/tc_area_chart.rb +++ b/test/drawing/tc_area_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestAreaChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet @@ -35,5 +34,4 @@ class TestAreaChart < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_area_series.rb b/test/drawing/tc_area_series.rb index 00229a39..efe48256 100644 --- a/test/drawing/tc_area_series.rb +++ b/test/drawing/tc_area_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestAreaSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" diff --git a/test/drawing/tc_bar_3D_chart.rb b/test/drawing/tc_bar_3D_chart.rb index b7a1eca4..f7e15dea 100644 --- a/test/drawing/tc_bar_3D_chart.rb +++ b/test/drawing/tc_bar_3D_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestBar3DChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet diff --git a/test/drawing/tc_bar_chart.rb b/test/drawing/tc_bar_chart.rb index c8bdc8d0..75a2970d 100644 --- a/test/drawing/tc_bar_chart.rb +++ b/test/drawing/tc_bar_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestBarChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet diff --git a/test/drawing/tc_bar_series.rb b/test/drawing/tc_bar_series.rb index f076fae0..81b88683 100644 --- a/test/drawing/tc_bar_series.rb +++ b/test/drawing/tc_bar_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestBarSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" diff --git a/test/drawing/tc_bubble_chart.rb b/test/drawing/tc_bubble_chart.rb index 7adad218..7a9af423 100644 --- a/test/drawing/tc_bubble_chart.rb +++ b/test/drawing/tc_bubble_chart.rb @@ -40,5 +40,4 @@ class TestBubbleChart < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_bubble_series.rb b/test/drawing/tc_bubble_series.rb index e601912f..a784619f 100644 --- a/test/drawing/tc_bubble_series.rb +++ b/test/drawing/tc_bubble_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestBubbleSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -17,5 +16,4 @@ class TestBubbleSeries < Test::Unit::TestCase doc = Nokogiri::XML(@chart.to_xml_string) assert_equal(doc.xpath("//a:srgbClr[@val='#{@series.color}']").size,2) end - end diff --git a/test/drawing/tc_cat_axis.rb b/test/drawing/tc_cat_axis.rb index b020fc53..79c0f8db 100644 --- a/test/drawing/tc_cat_axis.rb +++ b/test/drawing/tc_cat_axis.rb @@ -28,5 +28,4 @@ class TestCatAxis < Test::Unit::TestCase assert_raise(ArgumentError, "requires valid label offset") { @axis.lbl_offset = 'foo' } assert_nothing_raised("accepts valid label offset") { @axis.lbl_offset = "20" } end - end diff --git a/test/drawing/tc_chart.rb b/test/drawing/tc_chart.rb index 65d7877c..c322b37a 100644 --- a/test/drawing/tc_chart.rb +++ b/test/drawing/tc_chart.rb @@ -3,7 +3,6 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../" require 'tc_helper.rb' class TestChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet @@ -46,7 +45,6 @@ class TestChart < Test::Unit::TestCase assert_raise(ArgumentError) { @chart.bg_color = 2 } assert_nothing_raised { @chart.bg_color = "FFFFFF" } assert_equal(@chart.bg_color, "FFFFFF") - end def test_title_size @@ -80,7 +78,6 @@ class TestChart < Test::Unit::TestCase @chart.start_at [5,6] assert_equal(@chart.graphic_frame.anchor.from.col, 5) assert_equal(@chart.graphic_frame.anchor.from.row, 6) - end def test_end_at @@ -93,7 +90,6 @@ class TestChart < Test::Unit::TestCase @chart.end_at [10,11] assert_equal(@chart.graphic_frame.anchor.to.col, 10) assert_equal(@chart.graphic_frame.anchor.to.row, 11) - end def test_add_series @@ -107,7 +103,6 @@ class TestChart < Test::Unit::TestCase end def test_d_lbls - assert_equal(nil, Axlsx.instance_values_for(@chart)[:d_lbls]) @chart.d_lbls.d_lbl_pos = :t assert(@chart.d_lbls.is_a?(Axlsx::DLbls), 'DLbls instantiated on access') diff --git a/test/drawing/tc_d_lbls.rb b/test/drawing/tc_d_lbls.rb index cc12b561..ce71a00f 100644 --- a/test/drawing/tc_d_lbls.rb +++ b/test/drawing/tc_d_lbls.rb @@ -1,7 +1,6 @@ require 'tc_helper' class TestDLbls < Test::Unit::TestCase - def setup @d_lbls = Axlsx::DLbls.new(Axlsx::Pie3DChart) @boolean_attributes =[:show_legend_key, @@ -21,7 +20,6 @@ class TestDLbls < Test::Unit::TestCase end def test_initialization_with_optoins - options_hash = Hash[*[@boolean_attributes.map { |name| [name, true] }]] d_lbls = Axlsx::DLbls.new(Axlsx::Pie3DChart, options_hash.merge( { :d_lbl_pos => :t })) diff --git a/test/drawing/tc_data_source.rb b/test/drawing/tc_data_source.rb index 9ec260d8..2fec667f 100644 --- a/test/drawing/tc_data_source.rb +++ b/test/drawing/tc_data_source.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestNumDataSource < Test::Unit::TestCase - def setup @data_source = Axlsx::NumDataSource.new :data => ["1", "2", "3"] end @@ -19,5 +18,4 @@ require 'tc_helper.rb' doc = Nokogiri::XML(str) assert_equal(doc.xpath("//c:val").size, 1) end - end diff --git a/test/drawing/tc_drawing.rb b/test/drawing/tc_drawing.rb index bc9fc686..04b6ead6 100644 --- a/test/drawing/tc_drawing.rb +++ b/test/drawing/tc_drawing.rb @@ -4,7 +4,6 @@ class TestDrawing < Test::Unit::TestCase def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet - end def test_initialization @@ -78,5 +77,4 @@ class TestDrawing < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_hyperlink.rb b/test/drawing/tc_hyperlink.rb index d4fd4e13..ad8299b7 100644 --- a/test/drawing/tc_hyperlink.rb +++ b/test/drawing/tc_hyperlink.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestHyperlink < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet diff --git a/test/drawing/tc_line_3d_chart.rb b/test/drawing/tc_line_3d_chart.rb index ea0748c7..55398d50 100644 --- a/test/drawing/tc_line_3d_chart.rb +++ b/test/drawing/tc_line_3d_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestLine3DChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet @@ -42,5 +41,4 @@ class TestLine3DChart < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_line_chart.rb b/test/drawing/tc_line_chart.rb index 0783edae..113ef844 100644 --- a/test/drawing/tc_line_chart.rb +++ b/test/drawing/tc_line_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestLineChart < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet @@ -35,5 +34,4 @@ class TestLineChart < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_line_series.rb b/test/drawing/tc_line_series.rb index d939096f..1327a48f 100644 --- a/test/drawing/tc_line_series.rb +++ b/test/drawing/tc_line_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestLineSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" diff --git a/test/drawing/tc_marker.rb b/test/drawing/tc_marker.rb index 05137ae7..fdc6d5a1 100644 --- a/test/drawing/tc_marker.rb +++ b/test/drawing/tc_marker.rb @@ -40,5 +40,4 @@ class TestMarker < Test::Unit::TestCase assert_equal(@marker.col, 5) assert_equal(@marker.row, 10) end - end diff --git a/test/drawing/tc_num_data.rb b/test/drawing/tc_num_data.rb index f2ac64b8..fc5fabee 100644 --- a/test/drawing/tc_num_data.rb +++ b/test/drawing/tc_num_data.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestNumData < Test::Unit::TestCase - def setup @num_data = Axlsx::NumData.new :data => [1, 2, 3] end @@ -11,7 +10,6 @@ class TestNumData < Test::Unit::TestCase end def test_formula_based_cell - end def test_format_code @@ -27,5 +25,4 @@ class TestNumData < Test::Unit::TestCase assert_equal(doc.xpath("//c:numLit/c:ptCount[@val=3]").size, 1) assert_equal(doc.xpath("//c:numLit/c:pt/c:v[text()='1']").size, 1) end - end diff --git a/test/drawing/tc_num_val.rb b/test/drawing/tc_num_val.rb index ef27deb9..9722b434 100644 --- a/test/drawing/tc_num_val.rb +++ b/test/drawing/tc_num_val.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestNumVal < Test::Unit::TestCase - def setup @num_val = Axlsx::NumVal.new :v => 1 end @@ -23,7 +22,5 @@ class TestNumVal < Test::Unit::TestCase doc = Nokogiri::XML(str) # lets see if this works? assert_equal(doc.xpath("//c:pt/c:v[text()='1']").size, 1) - end - end diff --git a/test/drawing/tc_one_cell_anchor.rb b/test/drawing/tc_one_cell_anchor.rb index 3c1db55f..f9a04492 100644 --- a/test/drawing/tc_one_cell_anchor.rb +++ b/test/drawing/tc_one_cell_anchor.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestOneCellAnchor < Test::Unit::TestCase - def setup @p = Axlsx::Package.new @ws = @p.workbook.add_worksheet @@ -62,5 +61,4 @@ class TestOneCellAnchor < Test::Unit::TestCase assert_equal(2, i.anchor.from.row) assert_equal(@test_img, i.image_src) end - end diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb index 8c2088d4..bb81fc00 100644 --- a/test/drawing/tc_pic.rb +++ b/test/drawing/tc_pic.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPic < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet @@ -35,7 +34,6 @@ class TestPic < Test::Unit::TestCase assert_equal(start_at.col, @image.anchor.from.col) assert_equal(start_at.row, @image.anchor.from.row) assert_equal(200, @image.width) - end def test_hyperlink diff --git a/test/drawing/tc_picture_locking.rb b/test/drawing/tc_picture_locking.rb index 3714df0b..7347a571 100644 --- a/test/drawing/tc_picture_locking.rb +++ b/test/drawing/tc_picture_locking.rb @@ -66,5 +66,4 @@ class TestPictureLocking < Test::Unit::TestCase assert_nothing_raised { @item.noChangeShapeType = false } assert_equal(@item.noChangeShapeType, false ) end - end diff --git a/test/drawing/tc_pie_3D_chart.rb b/test/drawing/tc_pie_3D_chart.rb index a941eacd..6eb0dfe5 100644 --- a/test/drawing/tc_pie_3D_chart.rb +++ b/test/drawing/tc_pie_3D_chart.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPie3DChart < Test::Unit::TestCase - def setup p = Axlsx::Package.new ws = p.workbook.add_worksheet @@ -24,5 +23,4 @@ class TestPie3DChart < Test::Unit::TestCase errors = schema.validate(doc).map {|error| puts error.message; error } assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_pie_series.rb b/test/drawing/tc_pie_series.rb index 18e4bbd0..7ab81f46 100644 --- a/test/drawing/tc_pie_series.rb +++ b/test/drawing/tc_pie_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPieSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -29,5 +28,4 @@ class TestPieSeries < Test::Unit::TestCase assert(doc.xpath("//srgbClr[@val='#{@series.colors[0]}']")) end #TODO test unique serialization parts - end diff --git a/test/drawing/tc_scaling.rb b/test/drawing/tc_scaling.rb index 361f0b5d..909dded5 100644 --- a/test/drawing/tc_scaling.rb +++ b/test/drawing/tc_scaling.rb @@ -31,5 +31,4 @@ class TestScaling < Test::Unit::TestCase assert_raise(ArgumentError) { @scaling.min = 1} assert_nothing_raised {@scaling.min = 10.5} end - end diff --git a/test/drawing/tc_scatter_chart.rb b/test/drawing/tc_scatter_chart.rb index 37748b2f..a8d713eb 100644 --- a/test/drawing/tc_scatter_chart.rb +++ b/test/drawing/tc_scatter_chart.rb @@ -45,5 +45,4 @@ class TestScatterChart < Test::Unit::TestCase end assert(errors.empty?, "error free validation") end - end diff --git a/test/drawing/tc_scatter_series.rb b/test/drawing/tc_scatter_series.rb index 3d1d294d..fb30dd70 100644 --- a/test/drawing/tc_scatter_series.rb +++ b/test/drawing/tc_scatter_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestScatterSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -70,5 +69,4 @@ class TestScatterSeries < Test::Unit::TestCase @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :marker_symbol => :diamond assert_equal(@series.marker_symbol, :diamond, 'series could have own custom marker symbol') end - end diff --git a/test/drawing/tc_ser_axis.rb b/test/drawing/tc_ser_axis.rb index 342099cc..4b498a12 100644 --- a/test/drawing/tc_ser_axis.rb +++ b/test/drawing/tc_ser_axis.rb @@ -25,5 +25,4 @@ class TestSerAxis < Test::Unit::TestCase assert_nothing_raised("accepts valid tick_mark_skip") { @axis.tick_mark_skip = 2 } assert_equal(@axis.tick_mark_skip, 2) end - end diff --git a/test/drawing/tc_series.rb b/test/drawing/tc_series.rb index b32595a7..fc4d97e3 100644 --- a/test/drawing/tc_series.rb +++ b/test/drawing/tc_series.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestSeries < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -19,5 +18,4 @@ class TestSeries < Test::Unit::TestCase @series.order = 2 assert_equal(@series.order, 2) end - end diff --git a/test/drawing/tc_str_data.rb b/test/drawing/tc_str_data.rb index a116965b..f964a7b3 100644 --- a/test/drawing/tc_str_data.rb +++ b/test/drawing/tc_str_data.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestStrData < Test::Unit::TestCase - def setup @str_data = Axlsx::StrData.new :data => ["1", "2", "3"] end @@ -14,5 +13,4 @@ class TestStrData < Test::Unit::TestCase assert_equal(doc.xpath("//c:strLit/c:ptCount[@val=3]").size, 1) assert_equal(doc.xpath("//c:strLit/c:pt/c:v[text()='1']").size, 1) end - end diff --git a/test/drawing/tc_str_val.rb b/test/drawing/tc_str_val.rb index e4547f62..03b0b32a 100644 --- a/test/drawing/tc_str_val.rb +++ b/test/drawing/tc_str_val.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestStrVal < Test::Unit::TestCase - def setup @str_val = Axlsx::StrVal.new :v => "1" @str_val_with_special_characters = Axlsx::StrVal.new :v => "a & b <c>" @@ -26,5 +25,4 @@ class TestStrVal < Test::Unit::TestCase doc = Nokogiri::XML(str) assert_equal(doc.xpath("//c:pt/c:v[text()='a & b <c>']").size, 1) end - end diff --git a/test/drawing/tc_two_cell_anchor.rb b/test/drawing/tc_two_cell_anchor.rb index db84521d..2c0f32bd 100644 --- a/test/drawing/tc_two_cell_anchor.rb +++ b/test/drawing/tc_two_cell_anchor.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestTwoCellAnchor < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet @@ -32,5 +31,4 @@ class TestTwoCellAnchor < Test::Unit::TestCase assert_equal(a.graphic_frame.anchor.to.col, 90) assert_equal(a.graphic_frame.anchor.to.row, 45) end - end diff --git a/test/drawing/tc_val_axis.rb b/test/drawing/tc_val_axis.rb index 7fd9d1dd..a607ddb1 100644 --- a/test/drawing/tc_val_axis.rb +++ b/test/drawing/tc_val_axis.rb @@ -21,5 +21,4 @@ class TestValAxis < Test::Unit::TestCase assert_raise(ArgumentError, "requires valid crossBetween") { @axis.cross_between = :my_eyes } assert_nothing_raised("accepts valid crossBetween") { @axis.cross_between = :midCat } end - end diff --git a/test/drawing/tc_view_3D.rb b/test/drawing/tc_view_3D.rb index 175428ca..6202d851 100644 --- a/test/drawing/tc_view_3D.rb +++ b/test/drawing/tc_view_3D.rb @@ -47,5 +47,4 @@ class TestView3D < Test::Unit::TestCase assert_raise(ArgumentError) {@view.perspective = "bob"} assert_nothing_raised {@view.perspective = 30} end - end diff --git a/test/drawing/tc_vml_drawing.rb b/test/drawing/tc_vml_drawing.rb index ac95a2f3..792384e9 100644 --- a/test/drawing/tc_vml_drawing.rb +++ b/test/drawing/tc_vml_drawing.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestVmlDrawing < Test::Unit::TestCase - def setup p = Axlsx::Package.new wb = p.workbook @@ -21,5 +20,4 @@ class TestVmlDrawing < Test::Unit::TestCase assert_equal(doc.xpath("//v:shape").size, 2) assert(doc.xpath("//o:idmap[@o:data='#{@ws.index+1}']")) end - end diff --git a/test/drawing/tc_vml_shape.rb b/test/drawing/tc_vml_shape.rb index d8f10b56..b8344a92 100644 --- a/test/drawing/tc_vml_shape.rb +++ b/test/drawing/tc_vml_shape.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestVmlShape < Test::Unit::TestCase - def setup p = Axlsx::Package.new wb = p.workbook @@ -104,5 +103,4 @@ class TestVmlShape < Test::Unit::TestCase assert(doc.xpath("//v:shape/x:ClientData/x:Anchor[text()='#{shape.left_column}, #{shape.left_offset}, #{shape.top_row}, #{shape.top_offset}, #{shape.right_column}, #{shape.right_offset}, #{shape.bottom_row}, #{shape.bottom_offset}']").size == 1) end end - end diff --git a/test/rels/tc_relationship.rb b/test/rels/tc_relationship.rb index b9674a19..afdf5d1f 100644 --- a/test/rels/tc_relationship.rb +++ b/test/rels/tc_relationship.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestRelationships < Test::Unit::TestCase - def test_instances_with_different_attributes_have_unique_ids rel_1 = Axlsx::Relationship.new(Object.new, Axlsx::WORKSHEET_R, 'target') rel_2 = Axlsx::Relationship.new(Object.new, Axlsx::COMMENT_R, 'foobar') diff --git a/test/rels/tc_relationships.rb b/test/rels/tc_relationships.rb index 768570b1..43e413cd 100644 --- a/test/rels/tc_relationships.rb +++ b/test/rels/tc_relationships.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestRelationships < Test::Unit::TestCase - def test_for source_obj_1, source_obj_2 = Object.new, Object.new rel_1 = Axlsx::Relationship.new(source_obj_1, Axlsx::WORKSHEET_R, "bar") @@ -33,5 +32,4 @@ class TestRelationships < Test::Unit::TestCase assert(errors.size == 0) end - end diff --git a/test/stylesheet/tc_cell_alignment.rb b/test/stylesheet/tc_cell_alignment.rb index 6b8cd5cd..a61d764f 100644 --- a/test/stylesheet/tc_cell_alignment.rb +++ b/test/stylesheet/tc_cell_alignment.rb @@ -77,5 +77,4 @@ class TestCellAlignment < Test::Unit::TestCase assert_nothing_raised { @item.readingOrder = 2 } assert_equal(@item.readingOrder, 2 ) end - end diff --git a/test/stylesheet/tc_cell_protection.rb b/test/stylesheet/tc_cell_protection.rb index b2161fa6..a9648745 100644 --- a/test/stylesheet/tc_cell_protection.rb +++ b/test/stylesheet/tc_cell_protection.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestCellProtection < Test::Unit::TestCase - def setup @item = Axlsx::CellProtection.new end @@ -25,5 +24,4 @@ class TestCellProtection < Test::Unit::TestCase assert_nothing_raised { @item.locked = false } assert_equal(@item.locked, false ) end - end diff --git a/test/stylesheet/tc_cell_style.rb b/test/stylesheet/tc_cell_style.rb index 8700d8c3..5e71a698 100644 --- a/test/stylesheet/tc_cell_style.rb +++ b/test/stylesheet/tc_cell_style.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestCellStyle < Test::Unit::TestCase - def setup @item = Axlsx::CellStyle.new end @@ -53,5 +52,4 @@ class TestCellStyle < Test::Unit::TestCase assert_nothing_raised { @item.customBuiltin = true } assert_equal(@item.customBuiltin, true ) end - end diff --git a/test/stylesheet/tc_color.rb b/test/stylesheet/tc_color.rb index 660cc672..1fff4c3b 100644 --- a/test/stylesheet/tc_color.rb +++ b/test/stylesheet/tc_color.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestColor < Test::Unit::TestCase - def setup @item = Axlsx::Color.new end @@ -38,5 +37,4 @@ class TestColor < Test::Unit::TestCase assert_nothing_raised { @item.tint = -1.0 } assert_equal(@item.tint, -1.0 ) end - end diff --git a/test/stylesheet/tc_dxf.rb b/test/stylesheet/tc_dxf.rb index eb5c4014..ffc59dfb 100644 --- a/test/stylesheet/tc_dxf.rb +++ b/test/stylesheet/tc_dxf.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestDxf < Test::Unit::TestCase - def setup @item = Axlsx::Dxf.new @styles = Axlsx::Styles.new diff --git a/test/stylesheet/tc_fill.rb b/test/stylesheet/tc_fill.rb index 9aadef29..dd61204f 100644 --- a/test/stylesheet/tc_fill.rb +++ b/test/stylesheet/tc_fill.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestFill < Test::Unit::TestCase - def setup @item = Axlsx::Fill.new Axlsx::PatternFill.new end @@ -14,5 +13,4 @@ class TestFill < Test::Unit::TestCase assert_raise(ArgumentError) { Axlsx::Fill.new } assert_nothing_raised { Axlsx::Fill.new(Axlsx::GradientFill.new) } end - end diff --git a/test/stylesheet/tc_font.rb b/test/stylesheet/tc_font.rb index aaa72aa0..fb52f846 100644 --- a/test/stylesheet/tc_font.rb +++ b/test/stylesheet/tc_font.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestFont < Test::Unit::TestCase - def setup @item = Axlsx::Font.new end @@ -127,5 +126,4 @@ class TestFont < Test::Unit::TestCase assert_nothing_raised { @item.sz = 5 } assert_equal(@item.sz, 5) end - end diff --git a/test/stylesheet/tc_gradient_fill.rb b/test/stylesheet/tc_gradient_fill.rb index b8ce757b..9ff043cc 100644 --- a/test/stylesheet/tc_gradient_fill.rb +++ b/test/stylesheet/tc_gradient_fill.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestGradientFill < Test::Unit::TestCase - def setup @item = Axlsx::GradientFill.new end diff --git a/test/stylesheet/tc_gradient_stop.rb b/test/stylesheet/tc_gradient_stop.rb index 1340e225..2865f12d 100644 --- a/test/stylesheet/tc_gradient_stop.rb +++ b/test/stylesheet/tc_gradient_stop.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestGradientStop < Test::Unit::TestCase - def setup @item = Axlsx::GradientStop.new(Axlsx::Color.new(:rgb=>"FFFF0000"), 1.0) end @@ -26,5 +25,4 @@ class TestGradientStop < Test::Unit::TestCase @item.color = color assert_equal(@item.color.rgb, "FF0000FF") end - end diff --git a/test/stylesheet/tc_num_fmt.rb b/test/stylesheet/tc_num_fmt.rb index 5309f189..7c34be28 100644 --- a/test/stylesheet/tc_num_fmt.rb +++ b/test/stylesheet/tc_num_fmt.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestNumFmt < Test::Unit::TestCase - def setup @item = Axlsx::NumFmt.new end @@ -25,5 +24,4 @@ class TestNumFmt < Test::Unit::TestCase assert_nothing_raised { @item.formatCode = "0" } assert_equal(@item.formatCode, "0") end - end diff --git a/test/stylesheet/tc_pattern_fill.rb b/test/stylesheet/tc_pattern_fill.rb index ed567c7e..e22f4de6 100644 --- a/test/stylesheet/tc_pattern_fill.rb +++ b/test/stylesheet/tc_pattern_fill.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPatternFill < Test::Unit::TestCase - def setup @item = Axlsx::PatternFill.new end diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb index 37dc4fb4..627acbe3 100644 --- a/test/stylesheet/tc_styles.rb +++ b/test/stylesheet/tc_styles.rb @@ -305,6 +305,5 @@ class TestStyles < Test::Unit::TestCase border_pr = current_border.prs.detect{|x| x.name == edge } assert_equal(border_pr.color.rgb, "FF#{b_opts[:color]}") end - end end diff --git a/test/stylesheet/tc_table_style.rb b/test/stylesheet/tc_table_style.rb index f58a7a0d..f86cc54c 100644 --- a/test/stylesheet/tc_table_style.rb +++ b/test/stylesheet/tc_table_style.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestTableStyle < Test::Unit::TestCase - def setup @item = Axlsx::TableStyle.new "fisher" end diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb index 554636eb..4af3aeb5 100644 --- a/test/stylesheet/tc_table_style_element.rb +++ b/test/stylesheet/tc_table_style_element.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestTableStyleElement < Test::Unit::TestCase - def setup @item = Axlsx::TableStyleElement.new end diff --git a/test/stylesheet/tc_table_styles.rb b/test/stylesheet/tc_table_styles.rb index cc8da9d5..751874b1 100644 --- a/test/stylesheet/tc_table_styles.rb +++ b/test/stylesheet/tc_table_styles.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestTableStyles < Test::Unit::TestCase - def setup @item = Axlsx::TableStyles.new end @@ -25,5 +24,4 @@ class TestTableStyles < Test::Unit::TestCase assert_nothing_raised { @item.defaultPivotStyle = "anyones guess" } assert_equal(@item.defaultPivotStyle, "anyones guess") end - end diff --git a/test/stylesheet/tc_xf.rb b/test/stylesheet/tc_xf.rb index fdaef970..00e2a8a3 100644 --- a/test/stylesheet/tc_xf.rb +++ b/test/stylesheet/tc_xf.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestXf < Test::Unit::TestCase - def setup @item = Axlsx::Xf.new end @@ -116,5 +115,4 @@ class TestXf < Test::Unit::TestCase assert_nothing_raised { @item.applyProtection = false } assert_equal(@item.applyProtection, false) end - end diff --git a/test/tc_axlsx.rb b/test/tc_axlsx.rb index af9d505c..fc23cc5f 100644 --- a/test/tc_axlsx.rb +++ b/test/tc_axlsx.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestAxlsx < Test::Unit::TestCase - def setup_wide @wide_test_points = { "A3" => 0, @@ -140,5 +139,4 @@ class TestAxlsx < Test::Unit::TestCase assert_equal({foo: {baz: true}}, h1.merge(h2)) assert_equal({foo: {bar: true, baz: true}}, Axlsx.hash_deep_merge(h1, h2)) end - end diff --git a/test/tc_package.rb b/test/tc_package.rb index 82c4cb83..b3ca6810 100644 --- a/test/tc_package.rb +++ b/test/tc_package.rb @@ -90,7 +90,6 @@ class TestPackage < Test::Unit::TestCase ws.add_pivot_table 'G5:G6', 'A1:B3' ws.add_page_break "B2" - end def test_use_autowidth diff --git a/test/workbook/tc_defined_name.rb b/test/workbook/tc_defined_name.rb index aa4f84e1..e7fbe6b5 100644 --- a/test/workbook/tc_defined_name.rb +++ b/test/workbook/tc_defined_name.rb @@ -44,5 +44,4 @@ class TestDefinedNames < Test::Unit::TestCase assert_equal(doc.xpath("//definedName[@hidden='1']").size, 1) assert_equal('Sheet1!A1:A1', doc.xpath('//definedName').text) end - end diff --git a/test/workbook/tc_shared_strings_table.rb b/test/workbook/tc_shared_strings_table.rb index b9347903..7e8fb38e 100644 --- a/test/workbook/tc_shared_strings_table.rb +++ b/test/workbook/tc_shared_strings_table.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestSharedStringsTable < Test::Unit::TestCase - def setup @p = Axlsx::Package.new :use_shared_strings=>true diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb index f8d0b1f7..b678a183 100644 --- a/test/workbook/tc_workbook.rb +++ b/test/workbook/tc_workbook.rb @@ -44,7 +44,6 @@ class TestWorkbook < Test::Unit::TestCase @wb.add_worksheet(:name=>'foo') @wb.add_worksheet(:name=>'bar') assert_equal('foo', @wb.sheet_by_name('foo').name) - end def test_worksheet_empty_name diff --git a/test/workbook/tc_workbook_view.rb b/test/workbook/tc_workbook_view.rb index 2aa6521a..8280d8d5 100644 --- a/test/workbook/tc_workbook_view.rb +++ b/test/workbook/tc_workbook_view.rb @@ -1,7 +1,6 @@ require 'tc_helper' class TestWorkbookView < Test::Unit::TestCase - def setup @options = { visibility: :hidden, minimized: true, show_horizontal_scroll: true, show_vertical_scroll: true, show_sheet_tabs: true, tab_ratio: 750, first_sheet: 0, active_tab: 1, x_window: 500, y_window: 400, diff --git a/test/workbook/worksheet/auto_filter/tc_auto_filter.rb b/test/workbook/worksheet/auto_filter/tc_auto_filter.rb index d7d3b47c..60089d22 100644 --- a/test/workbook/worksheet/auto_filter/tc_auto_filter.rb +++ b/test/workbook/worksheet/auto_filter/tc_auto_filter.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestAutoFilter < Test::Unit::TestCase - def setup ws = Axlsx::Package.new.workbook.add_worksheet 3.times { |index| ws.add_row [1*index,2*index,3*index] } diff --git a/test/workbook/worksheet/auto_filter/tc_filter_column.rb b/test/workbook/worksheet/auto_filter/tc_filter_column.rb index 934931fd..642b7b6e 100644 --- a/test/workbook/worksheet/auto_filter/tc_filter_column.rb +++ b/test/workbook/worksheet/auto_filter/tc_filter_column.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestFilterColumn < Test::Unit::TestCase - def setup @filter_column = Axlsx::FilterColumn.new(0, :filters, :filter_items => [200]) end diff --git a/test/workbook/worksheet/tc_border_creator.rb b/test/workbook/worksheet/tc_border_creator.rb index 6a0f8424..eb27fe98 100644 --- a/test/workbook/worksheet/tc_border_creator.rb +++ b/test/workbook/worksheet/tc_border_creator.rb @@ -76,5 +76,4 @@ class TestBorderCreator < Test::Unit::TestCase assert_equal [:thick], @ws.styles.borders[4].prs.map(&:style).uniq assert_equal [:left], @ws.styles.borders[4].prs.map(&:name) end - end diff --git a/test/workbook/worksheet/tc_break.rb b/test/workbook/worksheet/tc_break.rb index 814a4878..884d9e01 100644 --- a/test/workbook/worksheet/tc_break.rb +++ b/test/workbook/worksheet/tc_break.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestBreak < Test::Unit::TestCase - def setup @break = Axlsx::Break.new(:id => 1, :min => 1, :max => 10, :man => true, :pt => false) end diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb index bdbfd59d..af3699ad 100644 --- a/test/workbook/worksheet/tc_cell.rb +++ b/test/workbook/worksheet/tc_cell.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestCell < Test::Unit::TestCase - def setup p = Axlsx::Package.new p.use_shared_strings = true diff --git a/test/workbook/worksheet/tc_cfvo.rb b/test/workbook/worksheet/tc_cfvo.rb index d846f57d..71ba6bbc 100644 --- a/test/workbook/worksheet/tc_cfvo.rb +++ b/test/workbook/worksheet/tc_cfvo.rb @@ -27,5 +27,4 @@ class TestCfvo < Test::Unit::TestCase doc = Nokogiri::XML.parse(@cfvo.to_xml_string) assert doc.xpath(".//cfvo[@type='min'][@val=0][@gte=true]") end - end diff --git a/test/workbook/worksheet/tc_col.rb b/test/workbook/worksheet/tc_col.rb index 00c5f058..2f31d7a2 100644 --- a/test/workbook/worksheet/tc_col.rb +++ b/test/workbook/worksheet/tc_col.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestCol < Test::Unit::TestCase - def setup @col = Axlsx::Col.new 1, 1 end @@ -89,5 +88,4 @@ class TestCol < Test::Unit::TestCase assert_equal(@col.style, 1) #TODO check that the style specified is actually in the styles xfs collection end - end diff --git a/test/workbook/worksheet/tc_color_scale.rb b/test/workbook/worksheet/tc_color_scale.rb index 56afe338..7f9e5def 100644 --- a/test/workbook/worksheet/tc_color_scale.rb +++ b/test/workbook/worksheet/tc_color_scale.rb @@ -55,5 +55,4 @@ class TestColorScale < Test::Unit::TestCase assert_equal(doc.xpath(".//colorScale//cfvo").size, 2) assert_equal(doc.xpath(".//colorScale//color").size, 2) end - end diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb index d9652ebf..cc885255 100644 --- a/test/workbook/worksheet/tc_conditional_formatting.rb +++ b/test/workbook/worksheet/tc_conditional_formatting.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestConditionalFormatting < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -17,7 +16,6 @@ class TestConditionalFormatting < Test::Unit::TestCase end def test_add_as_rule - color_scale = Axlsx::ColorScale.new do |cs| cs.colors.first.rgb = "FFDFDFDF" cs.colors.last.rgb = "FF00FF00" @@ -57,11 +55,9 @@ class TestConditionalFormatting < Test::Unit::TestCase doc = Nokogiri::XML.parse(cfs.last.to_xml_string) assert_equal(doc.xpath(".//conditionalFormatting//cfRule//iconSet//cfvo").size, 3) assert_equal(doc.xpath(".//conditionalFormatting//cfRule//iconSet[@iconSet='5Rating']").size, 1) - end def test_add_as_hash - color_scale = Axlsx::ColorScale.new do |cs| cs.colors.first.rgb = "FFDFDFDF" cs.colors.last.rgb = "FF00FF00" @@ -97,7 +93,6 @@ class TestConditionalFormatting < Test::Unit::TestCase doc = Nokogiri::XML.parse(cfs.last.to_xml_string) assert_equal(doc.xpath(".//conditionalFormatting//cfRule//iconSet//cfvo").size, 3) assert_equal(doc.xpath(".//conditionalFormatting//cfRule//iconSet[@iconSet='5Rating']").size, 1) - end def test_single_rule @@ -220,5 +215,4 @@ class TestConditionalFormatting < Test::Unit::TestCase assert_nothing_raised { @cfr.timePeriod = :today } assert_equal(@cfr.timePeriod, :today) end - end diff --git a/test/workbook/worksheet/tc_data_bar.rb b/test/workbook/worksheet/tc_data_bar.rb index fe02976d..65995dd2 100644 --- a/test/workbook/worksheet/tc_data_bar.rb +++ b/test/workbook/worksheet/tc_data_bar.rb @@ -41,5 +41,4 @@ class TestDataBar < Test::Unit::TestCase assert_equal(doc.xpath(".//dataBar//cfvo").size, 2) assert_equal(doc.xpath(".//dataBar//color").size, 1) end - end diff --git a/test/workbook/worksheet/tc_data_validation.rb b/test/workbook/worksheet/tc_data_validation.rb index 1d55aca3..0d9a2eb0 100644 --- a/test/workbook/worksheet/tc_data_validation.rb +++ b/test/workbook/worksheet/tc_data_validation.rb @@ -274,6 +274,5 @@ class TestDataValidation < Test::Unit::TestCase def test_empty_attributes v = Axlsx::DataValidation.new assert_equal(nil, v.send(:get_valid_attributes)) - end end diff --git a/test/workbook/worksheet/tc_date_time_converter.rb b/test/workbook/worksheet/tc_date_time_converter.rb index 225c1893..fafd66c6 100644 --- a/test/workbook/worksheet/tc_date_time_converter.rb +++ b/test/workbook/worksheet/tc_date_time_converter.rb @@ -110,7 +110,6 @@ class TestDateTimeConverter < Test::Unit::TestCase end def test_timezone - utc = Time.utc 2012 # January 1st, 2012 at 0:00 UTC local = Time.parse "2012-01-01 09:00:00 +0900" @@ -119,5 +118,4 @@ class TestDateTimeConverter < Test::Unit::TestCase Axlsx::Workbook.date1904 = true assert_equal Axlsx::DateTimeConverter::time_to_serial(local) - local.utc_offset.to_f/86400, Axlsx::DateTimeConverter::time_to_serial(utc) end - end diff --git a/test/workbook/worksheet/tc_header_footer.rb b/test/workbook/worksheet/tc_header_footer.rb index fb95d7bf..1ecea096 100644 --- a/test/workbook/worksheet/tc_header_footer.rb +++ b/test/workbook/worksheet/tc_header_footer.rb @@ -1,7 +1,6 @@ require 'tc_helper' class TestHeaderFooter < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet :name => 'test' diff --git a/test/workbook/worksheet/tc_icon_set.rb b/test/workbook/worksheet/tc_icon_set.rb index 9096625a..483de228 100644 --- a/test/workbook/worksheet/tc_icon_set.rb +++ b/test/workbook/worksheet/tc_icon_set.rb @@ -41,5 +41,4 @@ class TestIconSet < Test::Unit::TestCase assert_equal(doc.xpath(".//iconSet[@iconSet='3TrafficLights1'][@percent=1][@reverse=0][@showValue=1]").size, 1) assert_equal(doc.xpath(".//iconSet//cfvo").size, 3) end - end diff --git a/test/workbook/worksheet/tc_page_margins.rb b/test/workbook/worksheet/tc_page_margins.rb index 96695846..c1f2a626 100644 --- a/test/workbook/worksheet/tc_page_margins.rb +++ b/test/workbook/worksheet/tc_page_margins.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPageMargins < Test::Unit::TestCase - def setup p = Axlsx::Package.new ws = p.workbook.add_worksheet :name=>"hmmm" diff --git a/test/workbook/worksheet/tc_page_setup.rb b/test/workbook/worksheet/tc_page_setup.rb index 8c566a61..c7cec18b 100644 --- a/test/workbook/worksheet/tc_page_setup.rb +++ b/test/workbook/worksheet/tc_page_setup.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPageSetup < Test::Unit::TestCase - def setup @p = Axlsx::Package.new ws = @p.workbook.add_worksheet :name => "hmmm" @@ -137,6 +136,5 @@ class TestPageSetup < Test::Unit::TestCase fits = @ps.fit_to :height => 7, :width => 2 assert_equal(fits, [2, 7]) assert_raise(ArgumentError) { puts @ps.fit_to(:width => true)} - end end diff --git a/test/workbook/worksheet/tc_pivot_table.rb b/test/workbook/worksheet/tc_pivot_table.rb index b3ca647e..e03c5599 100644 --- a/test/workbook/worksheet/tc_pivot_table.rb +++ b/test/workbook/worksheet/tc_pivot_table.rb @@ -181,7 +181,6 @@ class TestPivotTable < Test::Unit::TestCase assert_nil( doc.at_css('colItems i')['x']) assert_equal('1', doc.at_css('colItems i[i=1] x')['v']) assert_equal('2', doc.at_css('colItems i[i=2] x')['v']) - end def test_pivot_table_with_only_one_data_row diff --git a/test/workbook/worksheet/tc_print_options.rb b/test/workbook/worksheet/tc_print_options.rb index 32af9cd0..8dc2b804 100644 --- a/test/workbook/worksheet/tc_print_options.rb +++ b/test/workbook/worksheet/tc_print_options.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestPrintOptions < Test::Unit::TestCase - def setup p = Axlsx::Package.new ws = p.workbook.add_worksheet :name => "hmmm" @@ -68,5 +67,4 @@ class TestPrintOptions < Test::Unit::TestCase assert_nothing_raised { @po.vertical_centered = true } assert_equal(@po.vertical_centered, true) end - end diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index e919b914..900e751e 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestRow < Test::Unit::TestCase - def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @@ -57,7 +56,6 @@ class TestRow < Test::Unit::TestCase r = @ws.add_row [1,2,3], :style=>[1] assert_equal(r.cells.first.style, 1, "only apply style to cells with at the same index of of the style array") assert_equal(r.cells.last.style, 0, "only apply style to cells with at the same index of of the style array") - end def test_array_to_cells_with_escape_formulas @@ -155,5 +153,4 @@ class TestRow < Test::Unit::TestCase assert_equal(c.value, index < offset ? nil : values[index - offset]) end end - end diff --git a/test/workbook/worksheet/tc_sheet_calc_pr.rb b/test/workbook/worksheet/tc_sheet_calc_pr.rb index 05b837cf..9473c94b 100644 --- a/test/workbook/worksheet/tc_sheet_calc_pr.rb +++ b/test/workbook/worksheet/tc_sheet_calc_pr.rb @@ -1,7 +1,6 @@ require 'tc_helper' class TestSheetCalcPr < Test::Unit::TestCase - def setup @sheet_calc_pr = Axlsx::SheetCalcPr.new(:full_calc_on_load => false) end diff --git a/test/workbook/worksheet/tc_sheet_format_pr.rb b/test/workbook/worksheet/tc_sheet_format_pr.rb index ec98988b..ef4eb0d8 100644 --- a/test/workbook/worksheet/tc_sheet_format_pr.rb +++ b/test/workbook/worksheet/tc_sheet_format_pr.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestSheetFormatPr < Test::Unit::TestCase - def setup @options = { :base_col_width => 5, @@ -86,5 +85,4 @@ class TestSheetFormatPr < Test::Unit::TestCase assert doc.xpath("sheetFormatPr[@outline_level_row=0]") assert doc.xpath("sheetFormatPr[@outline_level_col=0]") end - end diff --git a/test/workbook/worksheet/tc_sheet_pr.rb b/test/workbook/worksheet/tc_sheet_pr.rb index e39c8bca..f6ffcfdb 100644 --- a/test/workbook/worksheet/tc_sheet_pr.rb +++ b/test/workbook/worksheet/tc_sheet_pr.rb @@ -1,7 +1,6 @@ require 'tc_helper.rb' class TestSheetPr < Test::Unit::TestCase - def setup worksheet = Axlsx::Package.new.workbook.add_worksheet @options = { diff --git a/test/workbook/worksheet/tc_sheet_protection.rb b/test/workbook/worksheet/tc_sheet_protection.rb index 78969d34..26297bc4 100644 --- a/test/workbook/worksheet/tc_sheet_protection.rb +++ b/test/workbook/worksheet/tc_sheet_protection.rb @@ -58,5 +58,4 @@ class TestSheetProtection < Test::Unit::TestCase assert(doc.xpath("//sheetProtection[@#{key.to_s.gsub(/_(.)/){ $1.upcase }}='#{value}']")) end end - end diff --git a/test/workbook/worksheet/tc_sheet_view.rb b/test/workbook/worksheet/tc_sheet_view.rb index 386777b2..a09287aa 100644 --- a/test/workbook/worksheet/tc_sheet_view.rb +++ b/test/workbook/worksheet/tc_sheet_view.rb @@ -208,5 +208,4 @@ class TestSheetView < Test::Unit::TestCase @sv.add_selection(:top_left, :active_cell => "A1") assert_equal('A1', @sv.selections[:top_left].active_cell) end - end diff --git a/test/workbook/worksheet/tc_table.rb b/test/workbook/worksheet/tc_table.rb index fd6c1923..1a90f0bc 100644 --- a/test/workbook/worksheet/tc_table.rb +++ b/test/workbook/worksheet/tc_table.rb @@ -12,7 +12,6 @@ class TestTable < Test::Unit::TestCase def test_initialization assert(@ws.workbook.tables.empty?) assert(@ws.tables.empty?) - end def test_table_style_info diff --git a/test/workbook/worksheet/tc_table_style_info.rb b/test/workbook/worksheet/tc_table_style_info.rb index 9ba03ea7..19beaaba 100644 --- a/test/workbook/worksheet/tc_table_style_info.rb +++ b/test/workbook/worksheet/tc_table_style_info.rb @@ -13,7 +13,6 @@ class TestTableStyleInfo < Test::Unit::TestCase :show_row_stripes => 1, :show_column_stripes => 1, :name => "TableStyleDark4" } - end def test_initialize diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index 529fab5d..c264ec83 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -130,7 +130,6 @@ class TestWorksheet < Test::Unit::TestCase assert_equal(header_footer[key], optioned.header_footer.send(key)) end assert_equal(optioned.name, 'bob') - end # def test_use_gridlines @@ -892,5 +891,4 @@ class TestWorksheet < Test::Unit::TestCase wb.styles.style_index.values.first ) end - end diff --git a/test/workbook/worksheet/tc_worksheet_hyperlink.rb b/test/workbook/worksheet/tc_worksheet_hyperlink.rb index f64dc6b1..98b6937b 100644 --- a/test/workbook/worksheet/tc_worksheet_hyperlink.rb +++ b/test/workbook/worksheet/tc_worksheet_hyperlink.rb @@ -22,7 +22,6 @@ class TestWorksheetHyperlink < Test::Unit::TestCase end def test_target - assert_equal(@options[:target], Axlsx.instance_values_for(@a)['target']) end |
