Class: DatashiftJourney::Collector::Snippet

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/datashift_journey/collector/snippet.rb

Class Method Summary collapse

Class Method Details

.to_sentance(snippets) ⇒ Object



8
9
10
# File 'lib/datashift_journey/collector/snippet.rb', line 8

def self.to_sentance(snippets)
  snippets.collect { |s| s.I18n_key.present? ? I18n.t(s.I18n_key) : s.raw_text }.join(' ')
end