Class: Nucop::Helpers::NextCopForPromotion

Inherits:
Object
  • Object
show all
Defined in:
lib/nucop/helpers/next_cop_for_promotion.rb

Defined Under Namespace

Classes: Todo

Instance Method Summary collapse

Constructor Details

#initialize(todo_filepath) ⇒ NextCopForPromotion

Returns a new instance of NextCopForPromotion.



6
7
8
9
10
# File 'lib/nucop/helpers/next_cop_for_promotion.rb', line 6

def initialize(todo_filepath)
  @todo_filepath = todo_filepath
  extract_todos
  sort_todos_by_offense_count
end

Instance Method Details

#find(how_many = 5) ⇒ Object



12
13
14
# File 'lib/nucop/helpers/next_cop_for_promotion.rb', line 12

def find(how_many = 5)
  @todos.take(how_many)
end