Class: Inch::Codebase::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/inch/codebase/proxy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(language, provider) ⇒ Proxy



6
7
8
# File 'lib/inch/codebase/proxy.rb', line 6

def initialize(language, provider)
  @objects = Codebase::Objects.new(language, provider.objects)
end

Instance Attribute Details

#objectsObject (readonly)

Returns the value of attribute objects



4
5
6
# File 'lib/inch/codebase/proxy.rb', line 4

def objects
  @objects
end

Class Method Details

.parse(dir, config) ⇒ Object



19
20
21
22
# File 'lib/inch/codebase/proxy.rb', line 19

def self.parse(dir, config)
  provider = CodeObject::Provider.parse(dir, config)
  new(config.language, provider)
end

Instance Method Details

#grade_listsObject



10
11
12
13
14
15
16
17
# File 'lib/inch/codebase/proxy.rb', line 10

def grade_lists
  lists = Evaluation.new_grade_lists
  lists.each do |range|
    list = objects.select { |o| range.scores.include?(o.score) }
    range.objects = Objects.sort_by_priority(list)
  end
  lists
end