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

Code-Vedas / mutils / 4310584822

pending completion
4310584822

push

github

GitHub
build(deps): bump rubocop from 1.46.0 to 1.47.0 (#240)

205 of 205 relevant lines covered (100.0%)

14184.08 hits per line

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

100.0
/lib/mutils/serialization/results/relations.rb
1
# frozen_string_literal: true
2

3
# Module Mutils
4
module Mutils
1✔
5
  module Serialization
1✔
6
    # Module Results
7
    module Results
1✔
8
      # Module Relations
9
      module Relations
1✔
10
        def hash_relationships(relationships_array, result_hash)
1✔
11
          relationships = relationships_array&.compact
88,078✔
12
          relationships&.each do |key, s_options|
88,078✔
13
            object = scope.send(key)
79✔
14
            name = s_options[:label]
79✔
15
            Lib::Helper.instance.collection?(object) && (name = Lib::Helper.instance.pluralize(name))
79✔
16
            name = name.to_sym
79✔
17
            check_if_included(s_options, key) && (result_hash[name] = Lib::Helper.instance.constantize(s_options[:serializer]).new(object).to_h)
79✔
18
          end
19
        end
20
      end
21
    end
22
  end
23
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