lib/ayadn/workers.rb in ayadn-2.0.4 vs lib/ayadn/workers.rb in ayadn-2.0.5

- old
+ new

@@ -1,9 +1,11 @@ # encoding: utf-8 module Ayadn class Workers + attr_reader :thor + def initialize @thor = Thor::Shell::Color.new @status = Status.new end @@ -342,9 +344,13 @@ @status.links_saved(filename) end def extract_hashtags(post) post['entities']['hashtags'].map { |h| h['name'] } + end + + def extract_mentions(post) + post['entities']['mentions'].map { |m| m['name'] } end def build_channels(data, options = {}) bucket = [] data = [data] unless data.is_a?(Array)