class CricosScrape::ImportContacts

Public Class Methods

new() click to toggle source
# File lib/cricos_scrape/import_contacts.rb, line 6
def initialize
  @agent = CricosScrape.agent
end

Public Instance Methods

perform() click to toggle source
# File lib/cricos_scrape/import_contacts.rb, line 10
def perform
  contacts = ContactImporter.new(@agent).run

  if contacts.any?
    contacts.each do |contact|
      puts contact.to_json
    end
  else
    STDERR.puts "Something not right, there is no Contacts returned"
  end
end