diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-09-18 09:25:31 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-18 09:25:31 +0200 |
| commit | ebbeaea97ad7b4a597b34d9283abd74aa2e4e077 (patch) | |
| tree | 118a1c272106b51fae7599adf02abcafa7fcb670 | |
| parent | 3866257ec99c646a82c6f12e52361fbc4efc9b38 (diff) | |
| parent | ba7d1757f02663ce9231e08e0ccb6b45155f9204 (diff) | |
| download | caxlsx-ebbeaea97ad7b4a597b34d9283abd74aa2e4e077.tar.gz caxlsx-ebbeaea97ad7b4a597b34d9283abd74aa2e4e077.zip | |
Merge pull request #302 from tagliala/chore/use-class-name
Use `class.name` instead of `class.to_s`
| -rw-r--r-- | lib/axlsx/drawing/area_chart.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/line_chart.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/drawing/area_chart.rb b/lib/axlsx/drawing/area_chart.rb index 8a01f9f5..1d26a8fc 100644 --- a/lib/axlsx/drawing/area_chart.rb +++ b/lib/axlsx/drawing/area_chart.rb @@ -63,7 +63,7 @@ module Axlsx # chart based on the actual class type and not a fixed node name. # @return [String] def node_name - path = self.class.to_s + path = self.class.name if i = path.rindex('::') path = path[(i + 2)..-1] end diff --git a/lib/axlsx/drawing/line_chart.rb b/lib/axlsx/drawing/line_chart.rb index 14577900..c922de78 100644 --- a/lib/axlsx/drawing/line_chart.rb +++ b/lib/axlsx/drawing/line_chart.rb @@ -63,7 +63,7 @@ module Axlsx # chart based on the actual class type and not a fixed node name. # @return [String] def node_name - path = self.class.to_s + path = self.class.name if i = path.rindex('::') path = path[(i + 2)..-1] end |
