diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
| commit | ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 (patch) | |
| tree | 63a893a73f1cc51003edf218fed178bb93c604d7 /lib/axlsx/rels/relationship.rb | |
| parent | cfb516062de3d0725b3245cc328f96d702d662d3 (diff) | |
| download | caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.tar.gz caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.zip | |
Fix safe Style/ColonMethodCall offenses
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke
methods on `Axlsx` module.
This commit standardizes the approach towards `.`, which will also allow
shorter lines.
Performance is not affected
```
Comparison:
Axlsx.validate: 8515252.3 i/s
Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error
```
Diffstat (limited to 'lib/axlsx/rels/relationship.rb')
| -rw-r--r-- | lib/axlsx/rels/relationship.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/rels/relationship.rb b/lib/axlsx/rels/relationship.rb index 93cdc88b..62860f50 100644 --- a/lib/axlsx/rels/relationship.rb +++ b/lib/axlsx/rels/relationship.rb @@ -92,9 +92,9 @@ module Axlsx end # @see Target - def Target=(v) Axlsx::validate_string v; @Target = v end + def Target=(v) Axlsx.validate_string v; @Target = v end # @see Type - def Type=(v) Axlsx::validate_relationship_type v; @Type = v end + def Type=(v) Axlsx.validate_relationship_type v; @Type = v end # @see TargetMode def TargetMode=(v) RestrictionValidator.validate 'Relationship.TargetMode', [:External, :Internal], v; @TargetMode = v; end @@ -107,7 +107,7 @@ module Axlsx str << '<Relationship ' h.each_with_index do |key_value, index| str << ' ' unless index.zero? - str << key_value.first.to_s << '="' << Axlsx::coder.encode(key_value.last.to_s) << '"' + str << key_value.first.to_s << '="' << Axlsx.coder.encode(key_value.last.to_s) << '"' end str << '/>' end |
