Class: Workarea::Navigation::TaxonCache
- Inherits:
-
Object
- Object
- Workarea::Navigation::TaxonCache
- Defined in:
- app/models/workarea/navigation/taxon_cache.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(taxon) ⇒ TaxonCache
constructor
A new instance of TaxonCache.
- #set ⇒ Object
Constructor Details
#initialize(taxon) ⇒ TaxonCache
Returns a new instance of TaxonCache.
10 11 12 |
# File 'app/models/workarea/navigation/taxon_cache.rb', line 10 def initialize(taxon) @taxon = taxon end |
Class Method Details
.set(taxon) ⇒ Object
6 7 8 |
# File 'app/models/workarea/navigation/taxon_cache.rb', line 6 def self.set(taxon) new(taxon).set end |
Instance Method Details
#set ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/models/workarea/navigation/taxon_cache.rb', line 14 def set if @taxon.url? clear_navigable elsif @taxon.navigable? && @taxon.navigable.present? set_navigable_cache_values end ensure_navigable_slug end |