diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-08 11:55:52 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-08 11:55:52 +0200 |
| commit | 48f392fb7752f14153126e9d154b4f9e2eef8fa7 (patch) | |
| tree | 35e6e5052cb33a7cd5245df137c80d4ec7cb9346 /lib/axlsx/drawing/pic.rb | |
| parent | 55526805cf28cc91a22df5811b26cd23bdefa8d3 (diff) | |
| download | caxlsx-48f392fb7752f14153126e9d154b4f9e2eef8fa7.tar.gz caxlsx-48f392fb7752f14153126e9d154b4f9e2eef8fa7.zip | |
Fix Layout/EmptyLineAfterGuardClause offenses
```
rubocop --only Layout/EmptyLineAfterGuardClause -a
```
Diffstat (limited to 'lib/axlsx/drawing/pic.rb')
| -rw-r--r-- | lib/axlsx/drawing/pic.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 7d9cb532..64e5a877 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -73,6 +73,7 @@ module Axlsx Axlsx::validate_string(v) RestrictionValidator.validate 'Pic.image_src', ALLOWED_MIME_TYPES, MimeTypeUtils.get_mime_type(v) raise ArgumentError, "File does not exist" unless File.exist?(v) + @image_src = v end @@ -116,6 +117,7 @@ module Axlsx # @see OneCellAnchor.width def width return unless @anchor.is_a?(OneCellAnchor) + @anchor.width end @@ -187,6 +189,7 @@ module Axlsx # Changes the anchor to a one cell anchor. def use_one_cell_anchor return if @anchor.is_a?(OneCellAnchor) + new_anchor = OneCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row]) swap_anchor(new_anchor) end @@ -194,6 +197,7 @@ module Axlsx #changes the anchor type to a two cell anchor def use_two_cell_anchor return if @anchor.is_a?(TwoCellAnchor) + new_anchor = TwoCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row]) swap_anchor(new_anchor) end |
