Class: SimilarTopicsController::SimilarTopic
- Inherits:
-
Object
- Object
- SimilarTopicsController::SimilarTopic
- Defined in:
- app/controllers/similar_topics_controller.rb
Instance Attribute Summary collapse
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
- #blurb ⇒ Object
-
#initialize(topic) ⇒ SimilarTopic
constructor
A new instance of SimilarTopic.
Constructor Details
#initialize(topic) ⇒ SimilarTopic
Returns a new instance of SimilarTopic.
5 6 7 |
# File 'app/controllers/similar_topics_controller.rb', line 5 def initialize(topic) @topic = topic end |
Instance Attribute Details
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
9 10 11 |
# File 'app/controllers/similar_topics_controller.rb', line 9 def topic @topic end |
Instance Method Details
#blurb ⇒ Object
11 12 13 |
# File 'app/controllers/similar_topics_controller.rb', line 11 def blurb Search::GroupedSearchResults.blurb_for(cooked: @topic.try(:blurb)) end |