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

Code-Vedas / mutils / 8609270800

09 Apr 2024 02:03AM CUT coverage: 100.0%. Remained the same
8609270800

push

github

web-flow
build(deps): bump rake from 13.2.0 to 13.2.1 (#281)

Bumps [rake](https://github.com/ruby/rake) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v13.2.0...v13.2.1)

---
updated-dependencies:
- dependency-name: rake
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

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/base_serializer.rb
1
# frozen_string_literal: true
2

3
require 'json/ext'
4✔
4
# module Mutils
5
module Mutils
4✔
6
  module Serialization
4✔
7
    # BaseSerializer: inherit this class to get Serializer functionality
8
    class BaseSerializer
4✔
9
      attr_reader :scope
4✔
10

11
      include Mutils::Serialization::SerializationIncludes
4✔
12
      include Mutils::Serialization::SerializationMethods
4✔
13
      include Mutils::Serialization::SerializationResults
4✔
14

15
      def initialize(object, options = {})
4✔
16
        options[:child] = false unless options[:child]
352,392✔
17
        self.scope = object
352,392✔
18
        self.options = options
352,392✔
19
      end
20

21
      def as_json(_options = {})
4✔
22
        if options[:child] || !self.class.include_root
32✔
23
          to_h
24✔
24
        else
25
          { class_name => to_h }
8✔
26
        end
27
      end
28

29
      def to_h
4✔
30
        generate_hash
276✔
31
      end
32

33
      def to_json(_options = {})
4✔
34
        JSON.generate(as_json, options)
32✔
35
      end
36

37
      private
4✔
38

39
      attr_writer :scope
4✔
40
      attr_accessor :options
4✔
41
    end
42
  end
43
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