Class: CodeInventory::Inventory

Inherits:
Object
  • Object
show all
Defined in:
lib/codeinventory/inventory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sourcesObject

Returns the value of attribute sources.



3
4
5
# File 'lib/codeinventory/inventory.rb', line 3

def sources
  @sources
end

Instance Method Details

#projectsObject



9
10
11
# File 'lib/codeinventory/inventory.rb', line 9

def projects
  @sources.collect { |source| source.projects }.flatten
end