Class: Nutrella::BoardNameResolver
- Inherits:
-
Object
- Object
- Nutrella::BoardNameResolver
- Defined in:
- lib/nutrella/board_name_resolver.rb
Overview
Knows how to take the supplied board name and resolve it to a Trello board url.
Instance Method Summary collapse
-
#initialize(url_cache, search_specification) ⇒ BoardNameResolver
constructor
A new instance of BoardNameResolver.
- #resolve(board_name, &block) ⇒ Object
Constructor Details
#initialize(url_cache, search_specification) ⇒ BoardNameResolver
Returns a new instance of BoardNameResolver.
6 7 8 9 |
# File 'lib/nutrella/board_name_resolver.rb', line 6 def initialize(url_cache, search_specification) @url_cache = url_cache @search_specification = search_specification end |
Instance Method Details
#resolve(board_name, &block) ⇒ Object
11 12 13 |
# File 'lib/nutrella/board_name_resolver.rb', line 11 def resolve(board_name, &block) matching_url(board_name) || cached_url(board_name, &block) end |