Class: TrelloTool::Health
- Inherits:
-
Object
- Object
- TrelloTool::Health
- Defined in:
- lib/trello_tool/health.rb
Overview
Health analysis of a board
Instance Attribute Summary collapse
-
#board ⇒ Object
readonly
Returns the value of attribute board.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#expected_lists ⇒ Object
readonly
Returns the value of attribute expected_lists.
-
#symbols_and_colours ⇒ Object
readonly
Returns the value of attribute symbols_and_colours.
-
#unexpected ⇒ Object
readonly
Returns the value of attribute unexpected.
Instance Method Summary collapse
- #each_expected_list_with_length ⇒ Object
- #each_issue_with_severity {|todo_list_issue| ... } ⇒ Object
-
#initialize(board, configuration) ⇒ Health
constructor
A new instance of Health.
Constructor Details
#initialize(board, configuration) ⇒ Health
Returns a new instance of Health.
8 9 10 11 12 13 14 15 |
# File 'lib/trello_tool/health.rb', line 8 def initialize(board, configuration) @board = board @configuration = configuration @symbols_and_colours = [] @unexpected = [] @expected_lists = {} analyze end |
Instance Attribute Details
#board ⇒ Object (readonly)
Returns the value of attribute board.
6 7 8 |
# File 'lib/trello_tool/health.rb', line 6 def board @board end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
6 7 8 |
# File 'lib/trello_tool/health.rb', line 6 def configuration @configuration end |
#expected_lists ⇒ Object (readonly)
Returns the value of attribute expected_lists.
6 7 8 |
# File 'lib/trello_tool/health.rb', line 6 def expected_lists @expected_lists end |
#symbols_and_colours ⇒ Object (readonly)
Returns the value of attribute symbols_and_colours.
6 7 8 |
# File 'lib/trello_tool/health.rb', line 6 def symbols_and_colours @symbols_and_colours end |
#unexpected ⇒ Object (readonly)
Returns the value of attribute unexpected.
6 7 8 |
# File 'lib/trello_tool/health.rb', line 6 def unexpected @unexpected end |
Instance Method Details
#each_expected_list_with_length ⇒ Object
25 26 27 28 29 |
# File 'lib/trello_tool/health.rb', line 25 def each_expected_list_with_length expected_lists.each do |name, value| yield name, value[:length] end end |
#each_issue_with_severity {|todo_list_issue| ... } ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/trello_tool/health.rb', line 17 def each_issue_with_severity unexpected.each do |list, index| yield list.name.inspect, "Unexpected @ ##{index + 1}" end yield todo_list_issue if todo_list_issue yield doing_list_issue if doing_list_issue end |