Commit a3ac271102635c14eb9c81dcf8542ccc690e778c
1 parent
2b34bb97
Exists in
master
and in
1 other branch
Rubocop: when using access-modifier on method definition line, must be an instance method
This fortunately caused a spec to fail.
Showing
1 changed file
with
11 additions
and
9 deletions
Show diff stats
lib/hoptoad.rb
... | ... | @@ -7,16 +7,18 @@ module Hoptoad |
7 | 7 | end |
8 | 8 | end |
9 | 9 | |
10 | - def self.parse_xml!(xml) | |
11 | - parsed = ActiveSupport::XmlMini.backend.parse(xml)['notice'] || raise(ApiVersionError) | |
12 | - processor = get_version_processor(parsed['version']) | |
13 | - processor.process_notice(parsed) | |
14 | - end | |
10 | + class << self | |
11 | + def parse_xml!(xml) | |
12 | + parsed = ActiveSupport::XmlMini.backend.parse(xml)['notice'] || raise(ApiVersionError) | |
13 | + processor = get_version_processor(parsed['version']) | |
14 | + processor.process_notice(parsed) | |
15 | + end | |
15 | 16 | |
16 | - private def self.get_version_processor(version) | |
17 | - case version | |
18 | - when /2\.[01234]/ then Hoptoad::V2 | |
19 | - else; raise ApiVersionError | |
17 | + private def get_version_processor(version) | |
18 | + case version | |
19 | + when /2\.[01234]/ then Hoptoad::V2 | |
20 | + else; raise ApiVersionError | |
21 | + end | |
20 | 22 | end |
21 | 23 | end |
22 | 24 | end | ... | ... |