Skip to content

Commit bf1d299

Browse files
committed
Layout/ClassStructure
This commit moves the private method of the Puppet::Pops::Validation::Diagnostic to the end of the class. This was identified by the Rubocop Layout/ClassStructure cop.
1 parent e4a8889 commit bf1d299

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/puppet/pops/validation.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ def ==(o)
254254
alias eql? ==
255255
# rubocop:enable Layout
256256

257+
def hash
258+
@hash ||= [file, source_pos.offset, issue.issue_code, severity].hash
259+
end
260+
257261
# Position is equal if the diagnostic is not located or if referring to the same offset
258262
def same_position?(o)
259263
source_pos.nil? && o.source_pos.nil? || source_pos.offset == o.source_pos.offset
260264
end
261265
private :same_position?
262-
263-
def hash
264-
@hash ||= [file, source_pos.offset, issue.issue_code, severity].hash
265-
end
266266
end
267267

268268
# Formats a diagnostic for output.

0 commit comments

Comments
 (0)