Class: CodeInventory::Inventory
- Inherits:
-
Object
- Object
- CodeInventory::Inventory
- Defined in:
- lib/codeinventory/inventory.rb
Instance Attribute Summary collapse
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
-
#initialize(*sources) ⇒ Inventory
constructor
A new instance of Inventory.
- #projects ⇒ Object
Constructor Details
#initialize(*sources) ⇒ Inventory
Returns a new instance of Inventory.
5 6 7 |
# File 'lib/codeinventory/inventory.rb', line 5 def initialize(*sources) @sources = [sources].flatten end |
Instance Attribute Details
#sources ⇒ Object
Returns the value of attribute sources.
3 4 5 |
# File 'lib/codeinventory/inventory.rb', line 3 def sources @sources end |
Instance Method Details
#projects ⇒ Object
9 10 11 |
# File 'lib/codeinventory/inventory.rb', line 9 def projects @sources.collect { |source| source.projects }.flatten end |