Class: Rupert::RPM::Index
- Inherits:
-
Object
- Object
- Rupert::RPM::Index
- Defined in:
- lib/rupert/rpm/index.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
writeonly
Sets the attribute store.
Instance Method Summary collapse
-
#add(entry) ⇒ Object
Adds an entry to the index.
-
#get(tag) ⇒ Object
Retrieves data pointed by given tag.
-
#initialize(entries = [], store = nil) ⇒ Index
constructor
Initializes a new signature index, given the header’s entries and the store containing actual data.
Constructor Details
#initialize(entries = [], store = nil) ⇒ Index
Initializes a new signature index, given the header’s entries and the store containing actual data.
16 17 18 19 |
# File 'lib/rupert/rpm/index.rb', line 16 def initialize(entries=[], store=nil) @entries = index list_of entries @store = store end |
Instance Attribute Details
#store=(value) ⇒ Object (writeonly)
Sets the attribute store
6 7 8 |
# File 'lib/rupert/rpm/index.rb', line 6 def store=(value) @store = value end |
Instance Method Details
#add(entry) ⇒ Object
Adds an entry to the index.
34 35 36 |
# File 'lib/rupert/rpm/index.rb', line 34 def add(entry) @entries[entry.tag] = entry end |
#get(tag) ⇒ Object
Retrieves data pointed by given tag.
27 28 29 |
# File 'lib/rupert/rpm/index.rb', line 27 def get(tag) @entries[tag].resolve(@store) end |