summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-05 17:34:58 +0200
committerGeremia Taglialatela <[email protected]>2023-04-06 09:55:27 +0200
commitb5d7a7a1917adb12e3ea04abe261a37f8aff7f56 (patch)
tree8e99004348e47712008b9af75da3808721e8a659 /lib
parent9b246ec6395d49f09ab85ce0a2c024bf8d086d0c (diff)
downloadcaxlsx-b5d7a7a1917adb12e3ea04abe261a37f8aff7f56.tar.gz
caxlsx-b5d7a7a1917adb12e3ea04abe261a37f8aff7f56.zip
Fix Layout/EmptyLines offenses
``` rubocop --only Layout/EmptyLines -a ```
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/drawing/bar_series.rb1
-rw-r--r--lib/axlsx/drawing/cat_axis.rb1
-rw-r--r--lib/axlsx/drawing/d_lbls.rb2
-rw-r--r--lib/axlsx/drawing/drawing.rb1
-rw-r--r--lib/axlsx/drawing/line_3D_chart.rb1
-rw-r--r--lib/axlsx/drawing/marker.rb1
-rw-r--r--lib/axlsx/drawing/num_data_source.rb1
-rw-r--r--lib/axlsx/drawing/pie_3D_chart.rb1
-rw-r--r--lib/axlsx/drawing/ser_axis.rb1
-rw-r--r--lib/axlsx/package.rb4
-rw-r--r--lib/axlsx/stylesheet/cell_alignment.rb4
-rw-r--r--lib/axlsx/stylesheet/fill.rb1
-rw-r--r--lib/axlsx/stylesheet/xf.rb1
-rw-r--r--lib/axlsx/util/accessors.rb1
-rw-r--r--lib/axlsx/util/constants.rb1
-rw-r--r--lib/axlsx/util/simple_typed_list.rb2
-rw-r--r--lib/axlsx/util/validators.rb1
-rw-r--r--lib/axlsx/workbook/workbook.rb6
-rw-r--r--lib/axlsx/workbook/workbook_view.rb3
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/filters.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/color_scale.rb1
-rw-r--r--lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/data_validation.rb1
-rw-r--r--lib/axlsx/workbook/worksheet/page_setup.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/pane.rb1
-rw-r--r--lib/axlsx/workbook/worksheet/pivot_table.rb1
-rw-r--r--lib/axlsx/workbook/worksheet/sheet_view.rb5
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet_comments.rb1
29 files changed, 0 insertions, 52 deletions
diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb
index 344d3fd8..e90a2818 100644
--- a/lib/axlsx/drawing/bar_series.rb
+++ b/lib/axlsx/drawing/bar_series.rb
@@ -5,7 +5,6 @@ module Axlsx
# @see Chart#add_series
class BarSeries < Series
-
# The data for this series.
# @return [NumDataSource]
attr_reader :data
diff --git a/lib/axlsx/drawing/cat_axis.rb b/lib/axlsx/drawing/cat_axis.rb
index 0751c827..6e61d336 100644
--- a/lib/axlsx/drawing/cat_axis.rb
+++ b/lib/axlsx/drawing/cat_axis.rb
@@ -80,5 +80,4 @@ module Axlsx
end
-
end
diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb
index 0c8185f0..8623fd8a 100644
--- a/lib/axlsx/drawing/d_lbls.rb
+++ b/lib/axlsx/drawing/d_lbls.rb
@@ -65,7 +65,6 @@ module Axlsx
@d_lbl_pos = label_position
end
-
# serializes the data labels
# @return [String]
def to_xml_string(str = '')
@@ -86,6 +85,5 @@ module Axlsx
@show_leader_lines = nil
end
-
end
end
diff --git a/lib/axlsx/drawing/drawing.rb b/lib/axlsx/drawing/drawing.rb
index 33d38cef..87937d72 100644
--- a/lib/axlsx/drawing/drawing.rb
+++ b/lib/axlsx/drawing/drawing.rb
@@ -76,7 +76,6 @@ module Axlsx
@anchors = SimpleTypedList.new [TwoCellAnchor, OneCellAnchor]
end
-
# Adds an image to the chart If th end_at option is specified we create a two cell anchor. By default we use a one cell anchor.
# @note The recommended way to manage images is to use Worksheet.add_image. Please refer to that method for documentation.
# @see Worksheet#add_image
diff --git a/lib/axlsx/drawing/line_3D_chart.rb b/lib/axlsx/drawing/line_3D_chart.rb
index 57186c2f..8816d2e7 100644
--- a/lib/axlsx/drawing/line_3D_chart.rb
+++ b/lib/axlsx/drawing/line_3D_chart.rb
@@ -47,7 +47,6 @@ module Axlsx
axes.add_axis :ser_axis, SerAxis
end
-
# @see gapDepth
def gap_depth=(v)
RegexValidator.validate "Line3DChart.gapWidth", GAP_AMOUNT_PERCENT, v
diff --git a/lib/axlsx/drawing/marker.rb b/lib/axlsx/drawing/marker.rb
index 7307fcc9..7ef77f21 100644
--- a/lib/axlsx/drawing/marker.rb
+++ b/lib/axlsx/drawing/marker.rb
@@ -77,7 +77,6 @@ module Axlsx
[x, y]
end
-
end
end
diff --git a/lib/axlsx/drawing/num_data_source.rb b/lib/axlsx/drawing/num_data_source.rb
index 24bb9c4d..028b75d2 100644
--- a/lib/axlsx/drawing/num_data_source.rb
+++ b/lib/axlsx/drawing/num_data_source.rb
@@ -22,7 +22,6 @@ module Axlsx
parse_options options
end
-
# The tag name to use when serializing this data source.
# Only items defined in allowed_tag_names are allowed
# @return [Symbol]
diff --git a/lib/axlsx/drawing/pie_3D_chart.rb b/lib/axlsx/drawing/pie_3D_chart.rb
index 3b1e0c5c..e06e8d57 100644
--- a/lib/axlsx/drawing/pie_3D_chart.rb
+++ b/lib/axlsx/drawing/pie_3D_chart.rb
@@ -1,6 +1,5 @@
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
diff --git a/lib/axlsx/drawing/ser_axis.rb b/lib/axlsx/drawing/ser_axis.rb
index 3150adaa..805e4244 100644
--- a/lib/axlsx/drawing/ser_axis.rb
+++ b/lib/axlsx/drawing/ser_axis.rb
@@ -40,5 +40,4 @@ module Axlsx
end
end
-
end
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index acd55586..e866444b 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -35,8 +35,6 @@ module Axlsx
workbook.use_autowidth = v
end
-
-
# Shortcut to determine if the workbook is configured to use shared strings
# @see Workbook#use_shared_strings
def use_shared_strings
@@ -120,7 +118,6 @@ module Axlsx
Relationship.clear_ids_cache
end
-
# Serialize your workbook to a StringIO instance
# @param [Boolean] confirm_valid Validate the package prior to serialization.
# @return [StringIO|Boolean] False if confirm_valid and validation errors exist. rewound string IO if not.
@@ -225,7 +222,6 @@ module Axlsx
parts << {:entry => "xl/#{drawing.pn}", :doc => drawing, :schema => DRAWING_XSD}
end
-
workbook.tables.each do |table|
parts << {:entry => "xl/#{table.pn}", :doc => table, :schema => SML_XSD}
end
diff --git a/lib/axlsx/stylesheet/cell_alignment.rb b/lib/axlsx/stylesheet/cell_alignment.rb
index 8f93f4d7..45fe0e7d 100644
--- a/lib/axlsx/stylesheet/cell_alignment.rb
+++ b/lib/axlsx/stylesheet/cell_alignment.rb
@@ -1,12 +1,10 @@
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
@@ -25,8 +23,6 @@ module Axlsx
parse_options options
end
-
-
# The horizontal alignment of the cell.
# @note
# The horizontal cell alignement style must be one of
diff --git a/lib/axlsx/stylesheet/fill.rb b/lib/axlsx/stylesheet/fill.rb
index 4fa58aef..9b124e8d 100644
--- a/lib/axlsx/stylesheet/fill.rb
+++ b/lib/axlsx/stylesheet/fill.rb
@@ -29,6 +29,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/xf.rb b/lib/axlsx/stylesheet/xf.rb
index 3eb3da06..9aaba6fa 100644
--- a/lib/axlsx/stylesheet/xf.rb
+++ b/lib/axlsx/stylesheet/xf.rb
@@ -141,6 +141,5 @@ module Axlsx
str << '</xf>'
end
-
end
end
diff --git a/lib/axlsx/util/accessors.rb b/lib/axlsx/util/accessors.rb
index d21388a0..3eab1d39 100644
--- a/lib/axlsx/util/accessors.rb
+++ b/lib/axlsx/util/accessors.rb
@@ -22,7 +22,6 @@ module Axlsx
validated_attr_accessor(symbols, :validate_string)
end
-
# Creates one or more usigned integer 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 2284a8e3..7e26c478 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -162,7 +162,6 @@ module Axlsx
#drawing content type
DRAWING_CT = "application/vnd.openxmlformats-officedocument.drawing+xml".freeze
-
# xml content type extensions
XML_EX = "xml".freeze
diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb
index ac8b1679..5a15ddff 100644
--- a/lib/axlsx/util/simple_typed_list.rb
+++ b/lib/axlsx/util/simple_typed_list.rb
@@ -99,7 +99,6 @@ module Axlsx
alias :push :<<
-
# delete the item from the list
# @param [Any] v The item to be deleted.
# @raise [ArgumentError] if the item's index is protected by locking
@@ -174,5 +173,4 @@ module Axlsx
end
-
end
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb
index 01aef03c..9e3d0de1 100644
--- a/lib/axlsx/util/validators.rb
+++ b/lib/axlsx/util/validators.rb
@@ -62,7 +62,6 @@ module Axlsx
end
end
-
# Requires that the value can be converted to an integer
# @para, [Any] v the value to validate
# @raise [ArgumentError] raised if the value cannot be converted to an integer
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb
index 9797cb09..b5d229e1 100644
--- a/lib/axlsx/workbook/workbook.rb
+++ b/lib/axlsx/workbook/workbook.rb
@@ -42,7 +42,6 @@ require 'axlsx/workbook/worksheet/col_breaks'
require 'axlsx/workbook/workbook_view'
require 'axlsx/workbook/workbook_views'
-
require 'axlsx/workbook/worksheet/worksheet.rb'
require 'axlsx/workbook/shared_strings_table.rb'
require 'axlsx/workbook/defined_name.rb'
@@ -108,7 +107,6 @@ require 'axlsx/workbook/worksheet/selection.rb'
@is_reversed = v
end
-
# A collection of worksheets associated with this workbook.
# @note The recommended way to manage worksheets is add_worksheet
# @see Workbook#add_worksheet
@@ -139,7 +137,6 @@ require 'axlsx/workbook/worksheet/selection.rb'
# pretty sure this two are always empty and can be removed.
-
# A colllection of tables associated with this workbook
# @note The recommended way to manage drawings is Worksheet#add_table
# @see Worksheet#add_table
@@ -216,11 +213,9 @@ require 'axlsx/workbook/worksheet/selection.rb'
self.styles_applied = true
end
-
# Indicates if the epoc date for serialization should be 1904. If false, 1900 is used.
@@date1904 = false
-
# A quick helper to retrive a worksheet by name
# @param [String] name The name of the sheet you are looking for
# @return [Worksheet] The sheet found, or nil
@@ -243,7 +238,6 @@ require 'axlsx/workbook/worksheet/selection.rb'
@pivot_tables = SimpleTypedList.new PivotTable
@comments = SimpleTypedList.new Comments
-
@use_autowidth = true
@bold_font_multiplier = BOLD_FONT_MULTIPLIER
@font_scale_divisor = FONT_SCALE_DIVISOR
diff --git a/lib/axlsx/workbook/workbook_view.rb b/lib/axlsx/workbook/workbook_view.rb
index e0d38cae..b81fd4f4 100644
--- a/lib/axlsx/workbook/workbook_view.rb
+++ b/lib/axlsx/workbook/workbook_view.rb
@@ -31,7 +31,6 @@ module Axlsx
include Axlsx::OptionsParser
include Axlsx::Accessors
-
# Creates a new BookView object
# @param [Hash] options A hash of key/value pairs that will be mapped to this instances attributes.
# @option [Symbol] visibility Specifies visible state of the workbook window. The default value for this attribute is :visible.
@@ -52,7 +51,6 @@ module Axlsx
yield self if block_given?
end
-
unsigned_int_attr_accessor :x_window, :y_window, :window_width, :window_height,
:tab_ratio, :first_sheet, :active_tab
@@ -67,7 +65,6 @@ module Axlsx
boolean_attr_accessor :minimized, :show_horizontal_scroll, :show_vertical_scroll,
:show_sheet_tabs, :auto_filter_date_grouping
-
# Serialize the WorkbookView
# @param [String] str
# @return [String]
diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
index 215b66fe..11356c0a 100644
--- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
+++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
@@ -113,7 +113,6 @@ module Axlsx
@val = value
end
-
#Filter value used in the criteria.
attr_accessor :val
@@ -124,7 +123,6 @@ module Axlsx
end
end
-
# This collection is used to express a group of dates or times which are
# used in an AutoFilter criteria. Values are always written in the calendar
# type of the first date encountered in the filter range, so that all
diff --git a/lib/axlsx/workbook/worksheet/color_scale.rb b/lib/axlsx/workbook/worksheet/color_scale.rb
index 127b3e96..dc347a6a 100644
--- a/lib/axlsx/workbook/worksheet/color_scale.rb
+++ b/lib/axlsx/workbook/worksheet/color_scale.rb
@@ -73,7 +73,6 @@ module Axlsx
{:cfvo => value_objects.last, :color => colors.last}
end
-
# removes the cfvo and color pair at the index specified.
# @param [Integer] index The index of the cfvo and color object to delete
# @note you cannot remove the first two cfvo and color pairs
diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb
index a3959fe5..8fa0c5b5 100644
--- a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb
+++ b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb
@@ -132,7 +132,6 @@ module Axlsx
# thisMonth, lastMonth, nextMonth, thisWeek, lastWeek, nextWeek
attr_reader :timePeriod
-
# colorScale (Color Scale)
# The color scale to apply to this conditional formatting
# @return [ColorScale]
@@ -201,7 +200,6 @@ module Axlsx
@icon_set = v
end
-
# Serializes the conditional formatting rule
# @param [String] str
# @return [String]
diff --git a/lib/axlsx/workbook/worksheet/data_validation.rb b/lib/axlsx/workbook/worksheet/data_validation.rb
index 94a9e0c9..194c9a27 100644
--- a/lib/axlsx/workbook/worksheet/data_validation.rb
+++ b/lib/axlsx/workbook/worksheet/data_validation.rb
@@ -175,7 +175,6 @@ module Axlsx
# default none
attr_reader :type
-
# @see formula1
def formula1=(v); Axlsx::validate_string(v); @formula1 = v end
diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb
index 9558579e..d7abcbc2 100644
--- a/lib/axlsx/workbook/worksheet/page_setup.rb
+++ b/lib/axlsx/workbook/worksheet/page_setup.rb
@@ -182,7 +182,6 @@ module Axlsx
# @return [Integer]
attr_reader :paper_size
-
# Sets the paper size for printing.
# @see PageSetup#paper_size
# @return integer
@@ -221,7 +220,6 @@ module Axlsx
[@fit_to_width, @fit_to_height]
end
-
# helper method for worksheet to determine if the page setup is configured for fit to page printing
# We treat any page set up that has a value set for fit_to_width or fit_to_height value as fit_to_page.
# @return [Boolean]
diff --git a/lib/axlsx/workbook/worksheet/pane.rb b/lib/axlsx/workbook/worksheet/pane.rb
index 321294da..9c8671e6 100644
--- a/lib/axlsx/workbook/worksheet/pane.rb
+++ b/lib/axlsx/workbook/worksheet/pane.rb
@@ -49,7 +49,6 @@ module Axlsx
# default nil
attr_reader :active_pane
-
# Split State
# Indicates whether the pane has horizontal / vertical
# splits, and whether those splits are frozen.
diff --git a/lib/axlsx/workbook/worksheet/pivot_table.rb b/lib/axlsx/workbook/worksheet/pivot_table.rb
index 1a3682af..23d9828e 100644
--- a/lib/axlsx/workbook/worksheet/pivot_table.rb
+++ b/lib/axlsx/workbook/worksheet/pivot_table.rb
@@ -91,7 +91,6 @@ module Axlsx
# @return [Array]
attr_reader :rows
-
# (see #rows)
def rows=(v)
DataTypeValidator.validate "#{self.class}.rows", [Array], v
diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb
index e6e114d7..0ca87b3b 100644
--- a/lib/axlsx/workbook/worksheet/sheet_view.rb
+++ b/lib/axlsx/workbook/worksheet/sheet_view.rb
@@ -48,7 +48,6 @@ module Axlsx
:zoom_scale_sheet_layout_view, :zoom_scale_page_layout_view, :zoom_scale_normal, :workbook_view_id,
:view, :top_left_cell, :color_id, :zoom_scale
-
# instance values that must be serialized as their own elements - e.g. not attributes.
CHILD_ELEMENTS = [ :pane, :selections ]
@@ -85,7 +84,6 @@ module Axlsx
# default nil
attr_reader :top_left_cell
-
# View Type
# Indicates the view type.
# Options are
@@ -117,7 +115,6 @@ module Axlsx
# default 100
attr_reader :zoom_scale
-
# Zoom Scale Normal View
# Zoom magnification to use when in normal view,
# representing percent values. This attribute is
@@ -130,7 +127,6 @@ module Axlsx
# default 0
attr_reader :zoom_scale_normal
-
# Zoom Scale Page Layout View
# Zoom magnification to use when in page layout
# view, representing percent values. This attribute
@@ -143,7 +139,6 @@ module Axlsx
# default 0
attr_reader :zoom_scale_page_layout_view
-
# Zoom Scale Page Break Preview
# Zoom magnification to use when in page break
# preview, representing percent values. This
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb
index cb176455..9a9c4506 100644
--- a/lib/axlsx/workbook/worksheet/worksheet.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet.rb
@@ -173,7 +173,6 @@ module Axlsx
page_setup.fit_to_page?
end
-
# Column info for the sheet
# @return [SimpleTypedList]
def column_info
@@ -792,7 +791,6 @@ module Axlsx
@merged_cells ||= MergedCells.new self
end
-
# Helper method for parsingout the root node for worksheet
# @return [String]
def worksheet_node
diff --git a/lib/axlsx/workbook/worksheet/worksheet_comments.rb b/lib/axlsx/workbook/worksheet/worksheet_comments.rb
index c6dd5545..e976ad5c 100644
--- a/lib/axlsx/workbook/worksheet/worksheet_comments.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet_comments.rb
@@ -33,7 +33,6 @@ module Axlsx
comments.relationships
end
-
# Helper method to tell us if there are comments in the comments collection
# @return [Boolean]
def has_comments?