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

ruby-smart / support / #8

03 Jul 2024 08:24PM CUT coverage: 99.083%. Remained the same
#8

push

gonzo4711
## [1.5.0] - 2024-07-03
* **[add]** `RubySmart::Support::ThreadInfo.debugger?`-detection to determinate if a **Debugger** gem is active
* **[fix]** `String#to_boolean`-method to detect false-values (which makes all other values become true - similar to `::ActiveRecord::Type::Boolean`)

3 of 3 new or added lines in 2 files covered. (100.0%)

216 of 218 relevant lines covered (99.08%)

71.17 hits per line

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

100.0
/lib/ruby_smart/support/core_ext/ruby/enumerator.rb
1
# frozen_string_literal: true
2

3
unless Enumerator.method_defined? :from_hash
1✔
4
  class Enumerator
1✔
5
    # returns a new array with only values from provided key.
6
    # The Enumerator must be an array of hashes.
7
    #
8
    # @example
9
    #   ary = [{a: 34, b: 12}, {a: 19, c: 4}, {b: 3, c: 11}]
10
    #   ary.map.from_hash(:a)
11
    #   > [34, 19, nil]
12
    #
13
    # @param [Object] key
14
    # @return [Array] ary
15
    def from_hash(key)
1✔
16
      map &->(item){item[key]}
4✔
17
    end
18
  end
19
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

© 2025 Coveralls, Inc