Class: Hashira::Smells::Census

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/smells/census.rb

Instance Method Summary collapse

Constructor Details

#initialize(project, trees) ⇒ Census

Returns a new instance of Census.



6
7
8
9
# File 'lib/hashira/smells/census.rb', line 6

def initialize(project, trees)
  @project = project
  @trees = trees
end

Instance Method Details

#ownershipObject



11
# File 'lib/hashira/smells/census.rb', line 11

def ownership = @_ownership ||= Hashira::Smells::Ownership.new(@trees.values)

#typesObject



13
# File 'lib/hashira/smells/census.rb', line 13

def types = @trees.flat_map { |path, tree| harvest(@project.relative(path), tree) }