Class: Packerman::Repository
- Inherits:
-
Object
- Object
- Packerman::Repository
- Defined in:
- lib/packerman/repository.rb
Constant Summary collapse
- TEMPLATE_ATTRIBUTES =
[:builders, :provisioners]
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Repository
constructor
A new instance of Repository.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Repository
Returns a new instance of Repository.
4 5 6 |
# File 'lib/packerman/repository.rb', line 4 def initialize @_repo = {} end |
Class Method Details
.gather ⇒ Object
21 22 23 24 25 26 |
# File 'lib/packerman/repository.rb', line 21 def gather yield @_current_instance.to_hash.tap do @_current_instance = nil end end |
.instance ⇒ Object
28 29 30 |
# File 'lib/packerman/repository.rb', line 28 def instance @_current_instance ||= new end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 |
# File 'lib/packerman/repository.rb', line 16 def to_hash @_repo end |