• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wpscanteam / OptParseValidator / 13484526228

23 Feb 2025 03:44PM UTC coverage: 100.0%. Remained the same
13484526228

push

github

web-flow
Merge pull request #164 from wpscanteam/dependabot/bundler/rubocop-tw-1.72.2

Update rubocop requirement from ~> 1.28.1 to ~> 1.72.2

141 of 144 branches covered (97.92%)

15 of 15 new or added lines in 12 files covered. (100.0%)

414 of 414 relevant lines covered (100.0%)

100.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/opt_parse_validator/opts/array.rb
1
# frozen_string_literal: true
2

3
module OptParseValidator
4✔
4
  # Implementation of the Array Option
5
  class OptArray < OptBase
4✔
6
    # @return [ Void ]
7
    def append_help_messages
4✔
8
      option << "Separator to use between the values: '#{separator}'"
120✔
9

10
      super
120✔
11
    end
12

13
    # @param [ String ] value
14
    #
15
    # @return [ Array ]
16
    def validate(value)
4✔
17
      super.split(separator)
92✔
18
    end
19

20
    # @return [ String ] The separator used to split the string into an array
21
    def separator
4✔
22
      attrs[:separator] || ','
268✔
23
    end
24

25
    # See OptBase#normalize
26
    # @param [ Array ] values
27
    def normalize(values)
4✔
28
      values.each_with_index do |value, index|
8✔
29
        values[index] = super(value)
16✔
30
      end
31
      values
8✔
32
    end
33
  end
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc