Sha256: 49134e72b15bcbbfbe16473219d656329c94cf2e660e34f369c7f7ef7db558f1

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 Bytes

Contents

module TaliaCore

  # Dummy source class. This will be created by some mechanisms that need to create a relation to a 
  # not-yet-existing source. The DummySource should only exist temporarily, if some are found inside
  # the data store it may be a sign of an inconsistent or not completely initialized store.
  class DummySource < Source

    # Converts the current source into one with a "real" klass. Returns the new, converted sourc
    def self.make_real(klass)
      assit_kind_of(Class, klass)
      self['type'] = klass.name
      save!
      new_src = ActiveSource.find(uri)
      assit_kind_of(klass, new_src)
      new_src
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
talia_core-0.4.3 lib/talia_core/dummy_source.rb
talia_core-0.4.2 lib/talia_core/dummy_source.rb
talia_core-0.4.1 lib/talia_core/dummy_source.rb
talia_core-0.4.0 lib/talia_core/dummy_source.rb