Class: Abt::Providers::Devops::Services::BoardPicker
- Inherits:
-
Object
- Object
- Abt::Providers::Devops::Services::BoardPicker
- Defined in:
- lib/abt/providers/devops/services/board_picker.rb
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(cli:, config:) ⇒ BoardPicker
constructor
A new instance of BoardPicker.
Constructor Details
#initialize(cli:, config:) ⇒ BoardPicker
Returns a new instance of BoardPicker.
23 24 25 26 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 23 def initialize(cli:, config:) @cli = cli @config = config end |
Instance Attribute Details
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
21 22 23 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 21 def cli @cli end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
21 22 23 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 21 def config @config end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
21 22 23 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 21 def path @path end |
Class Method Details
.call(**args) ⇒ Object
17 18 19 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 17 def self.call(**args) new(**args).call end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 |
# File 'lib/abt/providers/devops/services/board_picker.rb', line 28 def call @path = ProjectPicker.call(cli: cli).path board = cli.prompt.choice("Select a project work board", boards) Result.new(board: board, path: path_with_board(team, board)) end |