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(provider) ⇒ Proxy

Returns a new instance of Proxy.



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

def initialize(provider)
  @objects = Codebase::Objects.new(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 = Dir.pwd, config = Inch::Config.codebase) ⇒ Object



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

def self.parse(dir = Dir.pwd, config = Inch::Config.codebase)
  provider = CodeObject::Provider.parse(dir, config)
  new(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