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

Code-Vedas / mutils / 6060940963

02 Sep 2023 10:54PM CUT coverage: 100.0%. Remained the same
6060940963

push

github

niteshpurohit
chore: maintainance

1 of 1 new or added line in 1 file covered. (100.0%)

205 of 205 relevant lines covered (100.0%)

56736.31 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
4✔
5
  module Serialization
4✔
6
    # Module Results
7
    module Results
4✔
8
      # Module Relations
9
      module Relations
4✔
10
        def hash_relationships(relationships_array, result_hash)
4✔
11
          relationships = relationships_array&.compact
352,312✔
12
          relationships&.each do |key, s_options|
352,312✔
13
            object = scope.send(key)
316✔
14
            name = s_options[:label]
316✔
15
            Lib::Helper.instance.collection?(object) && (name = Lib::Helper.instance.pluralize(name))
316✔
16
            name = name.to_sym
316✔
17
            check_if_included(s_options, key) && (result_hash[name] = Lib::Helper.instance.constantize(s_options[:serializer]).new(object).to_h)
316✔
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