Skip to content

Commit f44b680

Browse files
committed
Correct Style/ClassEqualityComparison
1 parent 5763336 commit f44b680

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,6 @@ Style/CaseLikeIf:
211211
Exclude:
212212
- 'spec/spec_helper_acceptance_local.rb'
213213

214-
# Offense count: 2
215-
# This cop supports safe autocorrection (--autocorrect).
216-
# Configuration parameters: AllowedMethods, AllowedPatterns.
217-
# AllowedMethods: ==, equal?, eql?
218-
Style/ClassEqualityComparison:
219-
Exclude:
220-
- 'lib/puppet_x/puppetlabs/dsc_lite/powershell_hash_formatter.rb'
221-
222214
# Offense count: 2
223215
Style/MixinUsage:
224216
Exclude:

lib/puppet_x/puppetlabs/dsc_lite/powershell_hash_formatter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class PowerShellHashFormatter
1212
#
1313
# @return [Object] Formatted value.
1414
def self.format(dsc_value)
15-
if dsc_value.class.name == 'Hash'
15+
if dsc_value.instance_of?(::Hash)
1616
format_hash(dsc_value)
17-
elsif dsc_value.class.name == 'Puppet::Pops::Types::PSensitiveType::Sensitive'
17+
elsif dsc_value.instance_of?(::Puppet::Pops::Types::PSensitiveType::Sensitive)
1818
"'#{escape_quotes(dsc_value.unwrap)}' # PuppetSensitive"
1919
else
2020
Pwsh::Util.format_powershell_value(dsc_value)

0 commit comments

Comments
 (0)