Class: TelegramBot::TrelloConnector
- Inherits:
-
Object
- Object
- TelegramBot::TrelloConnector
- Defined in:
- lib/telegram-bot/trello.rb
Instance Attribute Summary collapse
-
#board_name ⇒ Object
readonly
Returns the value of attribute board_name.
-
#github_repository ⇒ Object
readonly
Returns the value of attribute github_repository.
-
#github_username ⇒ Object
readonly
Returns the value of attribute github_username.
-
#statistics ⇒ Object
readonly
Returns the value of attribute statistics.
Instance Method Summary collapse
-
#initialize(username:, repository:) ⇒ TrelloConnector
constructor
A new instance of TrelloConnector.
- #show_statistics ⇒ Object
Constructor Details
#initialize(username:, repository:) ⇒ TrelloConnector
Returns a new instance of TrelloConnector.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/telegram-bot/trello.rb', line 23 def initialize(username:, repository:) @statistics = { boards_created: 0, lists_created: 0, cards_created: 0 } @github_username = username @github_repository = repository @board_name = @github_repository.split(/[-_]/i).map(&:capitalize).join(' ') @board = find_or_create_board_by_name create_scrum_lists(@board) close_default_lists(@board) populate_issues_cards end |
Instance Attribute Details
#board_name ⇒ Object (readonly)
Returns the value of attribute board_name.
21 22 23 |
# File 'lib/telegram-bot/trello.rb', line 21 def board_name @board_name end |
#github_repository ⇒ Object (readonly)
Returns the value of attribute github_repository.
21 22 23 |
# File 'lib/telegram-bot/trello.rb', line 21 def github_repository @github_repository end |
#github_username ⇒ Object (readonly)
Returns the value of attribute github_username.
21 22 23 |
# File 'lib/telegram-bot/trello.rb', line 21 def github_username @github_username end |
#statistics ⇒ Object (readonly)
Returns the value of attribute statistics.
21 22 23 |
# File 'lib/telegram-bot/trello.rb', line 21 def statistics @statistics end |
Instance Method Details
#show_statistics ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/telegram-bot/trello.rb', line 35 def show_statistics "Estadisticas del proceso:\n" + "-" * 25 + "\n" + "Tableros Creados: #{@statistics[:boards_created]}\n" + "Listas Creadas: #{@statistics[:lists_created]}\n" + "Tarjetas Creadas: #{@statistics[:cards_created]}\n" end |