Class: Jira::Auto::Tool::BoardController
- Defined in:
- lib/jira/auto/tool/board_controller.rb,
lib/jira/auto/tool/board_controller/options.rb
Defined Under Namespace
Classes: Options
Instance Attribute Summary collapse
-
#jira_client ⇒ Object
readonly
Returns the value of attribute jira_client.
-
#tool ⇒ Object
readonly
Returns the value of attribute tool.
Instance Method Summary collapse
- #boards ⇒ Object
- #clear_cache ⇒ Object
-
#initialize(tool) ⇒ BoardController
constructor
A new instance of BoardController.
- #list_boards ⇒ Object
Constructor Details
#initialize(tool) ⇒ BoardController
Returns a new instance of BoardController.
12 13 14 15 |
# File 'lib/jira/auto/tool/board_controller.rb', line 12 def initialize(tool) @tool = tool @jira_client = tool.jira_client end |
Instance Attribute Details
#jira_client ⇒ Object (readonly)
Returns the value of attribute jira_client.
10 11 12 |
# File 'lib/jira/auto/tool/board_controller.rb', line 10 def jira_client @jira_client end |
#tool ⇒ Object (readonly)
Returns the value of attribute tool.
10 11 12 |
# File 'lib/jira/auto/tool/board_controller.rb', line 10 def tool @tool end |
Instance Method Details
#boards ⇒ Object
27 28 29 30 31 |
# File 'lib/jira/auto/tool/board_controller.rb', line 27 def boards return cached_boards if valid_cache? cache_boards(filtered_boards) end |
#clear_cache ⇒ Object
33 34 35 |
# File 'lib/jira/auto/tool/board_controller.rb', line 33 def clear_cache cache.clear end |
#list_boards ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/jira/auto/tool/board_controller.rb', line 17 def list_boards table = Terminal::Table.new( title: "Boards", headings: ["Project Key", "Name", "Board UI URL"], rows: boards.collect { |board| [board.project_key, board.name, board.ui_url] } ) puts table end |