Class: Callme::DepsMetadataStorage
- Inherits:
-
Object
- Object
- Callme::DepsMetadataStorage
- Defined in:
- lib/callme/deps_metadata_storage.rb
Overview
Storage of dep metadatas
Instance Method Summary collapse
-
#by_name(name) ⇒ Object
Finds dep metadata in storage by it’s name.
-
#copy ⇒ Object
Creates an independent copy of this instance.
-
#initialize(dep_metadatas = {}) ⇒ DepsMetadataStorage
constructor
A new instance of DepsMetadataStorage.
- #keys ⇒ Object
-
#put(dep_metadata) ⇒ Object
Saves a given
dep_metadata
to the storage. - #values ⇒ Object
Constructor Details
#initialize(dep_metadatas = {}) ⇒ DepsMetadataStorage
Returns a new instance of DepsMetadataStorage.
3 4 5 |
# File 'lib/callme/deps_metadata_storage.rb', line 3 def initialize( = {}) @dep_metadatas = end |
Instance Method Details
#by_name(name) ⇒ Object
Finds dep metadata in storage by it’s name
10 11 12 |
# File 'lib/callme/deps_metadata_storage.rb', line 10 def by_name(name) @dep_metadatas[name] end |
#copy ⇒ Object
Creates an independent copy of this instance
29 30 31 |
# File 'lib/callme/deps_metadata_storage.rb', line 29 def copy self.class.new(@dep_metadatas.dup) end |
#keys ⇒ Object
24 25 26 |
# File 'lib/callme/deps_metadata_storage.rb', line 24 def keys @dep_metadatas.keys end |
#put(dep_metadata) ⇒ Object
Saves a given dep_metadata
to the storage
16 17 18 |
# File 'lib/callme/deps_metadata_storage.rb', line 16 def put() @dep_metadatas[.name] = end |
#values ⇒ Object
20 21 22 |
# File 'lib/callme/deps_metadata_storage.rb', line 20 def values @dep_metadatas.values end |