Class: Flutter::Persistence::AbstractStorage Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/flutter/persistence.rb

Overview

This class is abstract.

Override this class to implement a custom storage

The abstract base storage.

To implement a custom storage, override the following methods:

Direct Known Subclasses

Marshal, Yaml

Instance Method Summary collapse

Constructor Details

#initializeAbstractStorage

Returns a new instance of AbstractStorage.



21
22
23
# File 'lib/flutter/persistence.rb', line 21

def initialize
  load!
end

Instance Method Details

#clear!void

This method returns an undefined value.

Clear any saved state in the underlying storage

Raises:

  • (NotImplementedError)


71
72
73
# File 'lib/flutter/persistence.rb', line 71

def clear!
  raise NotImplementedError
end

#load!void

This method returns an undefined value.

If the storage was already persisted load the current state

Raises:

  • (NotImplementedError)


77
78
79
# File 'lib/flutter/persistence.rb', line 77

def load!
  raise NotImplementedError
end

#persist!void

This method returns an undefined value.

Save the state of test & source mapping to the underlying storage

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/flutter/persistence.rb', line 65

def persist!
  raise NotImplementedError
end

#source_hintsHash<String, Set<String>]

Mapping of +source file -> class or module

Returns:

  • (Hash<String, Set<String>])

    Hash]

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/flutter/persistence.rb', line 41

def source_hints
  raise NotImplementedError
end

#source_mappingHash<String, Hash<String, String>>

Mapping of +source file -> callable_id -> signature+

Returns:

  • (Hash<String, Hash<String, String>>)

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/flutter/persistence.rb', line 35

def source_mapping
  raise NotImplementedError
end

#test_mappingHash<String, Hash<String, Set<String>>>

Mapping of +test_id -> source file -> callable_id+

Returns:

  • (Hash<String, Hash<String, Set<String>>>)

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/flutter/persistence.rb', line 29

def test_mapping
  raise NotImplementedError
end

#update_source_mapping!(mapping, hints) ⇒ Object

Parameters:

  • mapping (Hash<String, Hash<String, String>>)
  • hints (Hash<String, Hash<String, String>>)

Raises:

  • (NotImplementedError)


58
59
60
# File 'lib/flutter/persistence.rb', line 58

def update_source_mapping!(mapping, hints)
  raise NotImplementedError
end

#update_test_mapping!(mapping) ⇒ Object

Update #test_mapping

Parameters:

  • mapping (Hash<String, Hash<String, String>>)

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/flutter/persistence.rb', line 49

def update_test_mapping!(mapping)
  raise NotImplementedError
end