Class: TrelloDXY::Requests::BoardForUrl
- Inherits:
-
Object
- Object
- TrelloDXY::Requests::BoardForUrl
- Includes:
- Shared
- Defined in:
- lib/trello_dxy/requests/board_for_url.rb
Instance Method Summary collapse
- #board(url) ⇒ Object
-
#initialize ⇒ BoardForUrl
constructor
A new instance of BoardForUrl.
Methods included from Shared
#connect_to_trello, #get_key, #key, #make_dotfile, #token
Constructor Details
#initialize ⇒ BoardForUrl
Returns a new instance of BoardForUrl.
6 7 8 |
# File 'lib/trello_dxy/requests/board_for_url.rb', line 6 def initialize connect_to_trello end |
Instance Method Details
#board(url) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/trello_dxy/requests/board_for_url.rb', line 10 def board(url) board = Trello::Board.all.find { |board| board.url == url } if board.nil? puts 'The given board URL was not found' exit 1 end board end |