Module: ActsAsWordCloud::WordCloud::InstanceMethods
- Defined in:
- lib/acts_as_word_cloud/word_cloud.rb
Instance Method Summary collapse
-
#word_cloud(return_type = :string) ⇒ Array<String> or String
Uses recursive word cloud to find text attributes, associations and included methods on the model.
Instance Method Details
#word_cloud(return_type = :string) ⇒ Array<String> or String
Uses recursive word cloud to find text attributes, associations and included methods on the model
44 45 46 47 48 49 50 51 |
# File 'lib/acts_as_word_cloud/word_cloud.rb', line 44 def word_cloud(return_type = :string) output = recursive_word_cloud(self.word_cloud_attributes[:depth]).uniq.flatten if return_type == :string return output.join(' ') else return output end end |