Class: Ecoportal::API::Common::GraphQL::Model::Diffable::ClassicDiffService
- Inherits:
-
Object
- Object
- Ecoportal::API::Common::GraphQL::Model::Diffable::ClassicDiffService
- Includes:
- HashDiffNesting
- Defined in:
- lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb
Direct Known Subclasses
Constant Summary
Constants included from HashDiffNesting
HashDiffNesting::META_KEYS, HashDiffNesting::NO_CHANGES
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
- #diff(ignore: []) ⇒ Object
-
#initialize(subject, ignore: []) ⇒ ClassicDiffService
constructor
A new instance of ClassicDiffService.
Methods included from HashDiffNesting::InstanceMethods
Constructor Details
#initialize(subject, ignore: []) ⇒ ClassicDiffService
Returns a new instance of ClassicDiffService.
7 8 9 10 11 12 13 14 |
# File 'lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb', line 7 def initialize(subject, ignore: []) msg = 'Expecting Ecoportal::API::Common::Content::DoubleModel. ' msg << "Given: #{subject.class}" raise ArgumentError, msg unless subject.is_a?(Ecoportal::API::Common::Content::DoubleModel) @subject = subject @ignored = to_a(ignore) end |
Instance Attribute Details
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
5 6 7 |
# File 'lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb', line 5 def subject @subject end |
Instance Method Details
#diff(ignore: []) ⇒ Object
16 17 18 |
# File 'lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb', line 16 def diff(ignore: []) classic_diff(ignore: ignore) end |