Method: Activr::Timeline#dump

Defined in:
lib/activr/timeline.rb

#dump(options = { }) ⇒ Array<String>

Dump humanization of last timeline entries

Parameters:

  • options (Hash) (defaults to: { })

    Options hash

Options Hash (options):

  • :nb (Integer)

    Number of timeline entries to dump (default: 100)

  • :html (true, false)

    Output HTML (default: ‘false`)

Returns:

  • (Array<String>)

    Array of humanized sentences



368
369
370
371
372
373
374
# File 'lib/activr/timeline.rb', line 368

def dump(options = { })
  options = options.dup

  limit = options.delete(:nb) || 100

  self.find(limit).map{ |tl_entry| tl_entry.humanize(options) }
end