Module: Ecoportal::API::Common::GraphQL::Model::Diffable
- Included in:
- Ecoportal::API::Common::GraphQL::Model
- Defined in:
- lib/ecoportal/api/common/graphql/model/diffable.rb,
lib/ecoportal/api/common/graphql/model/diffable/hash_diff.rb
Defined Under Namespace
Modules: HashDiff
Instance Method Summary collapse
-
#as_update(ref = :last, ignore: []) ⇒ Object
INSTANCE METHODS.
Instance Method Details
#as_update(ref = :last, ignore: []) ⇒ Object
INSTANCE METHODS
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ecoportal/api/common/graphql/model/diffable.rb', line 17 def as_update(ref = :last, ignore: []) new_doc = as_json ref_doc = ref == :total ? initial_doc : original_doc self.class.hash_diff( new_doc, ref_doc, ignore: ignore ) end |