class LittleGhost::Models::Catalog::Source
Interface for catalog refresh implementations.
Attributes
Stable provenance name recorded for refreshed facts.
Public Class Methods
Source
# File lib/little_ghost/models/catalog/source.rb, line 14 def initialize(name:) @name = name.to_s.freeze end
Creates a source with its provenance name.
Public Instance Methods
# File lib/little_ghost/models/catalog/source.rb, line 21 def attribute_merge_strategies = DEFAULT_ATTRIBUTE_MERGE_STRATEGIES
Returns exceptional attribute merge strategies for records from this source. Attributes replace older values unless an array is mapped to :union.
Source
# File lib/little_ghost/models/catalog/source.rb, line 24 def refresh(target: nil) raise AbstractMethodError, "#{self.class} must implement #refresh" end
Returns normalized model records, optionally scoped to target.