Class: Hashira::Analysis::Roster

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/analysis/roster.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(placed) ⇒ Roster

Returns a new instance of Roster.



4
5
6
7
8
9
# File 'lib/hashira/analysis/roster.rb', line 4

def initialize(placed)
  @registry = Hashira::Analysis::ConstantRegistry.new
  @types = Hash.new(0)
  counted = Set.new
  placed.each { |definition, package| admit(definition, package, counted) }
end

Instance Attribute Details

#registryObject (readonly)

Returns the value of attribute registry.



11
12
13
# File 'lib/hashira/analysis/roster.rb', line 11

def registry
  @registry
end

#typesObject (readonly)

Returns the value of attribute types.



11
12
13
# File 'lib/hashira/analysis/roster.rb', line 11

def types
  @types
end

Instance Method Details

#originsObject



13
# File 'lib/hashira/analysis/roster.rb', line 13

def origins = @registry.origins

#packagesObject



15
# File 'lib/hashira/analysis/roster.rb', line 15

def packages = @types.keys | @registry.packages