class EmailHunter::Count
Attributes
data[R]
domain[R]
meta[R]
Public Class Methods
new(domain)
click to toggle source
# File lib/email_hunter/count.rb, line 10 def initialize(domain) @domain = domain end
Public Instance Methods
apiresponse()
click to toggle source
# File lib/email_hunter/count.rb, line 18 def apiresponse @data ||= begin response = Faraday.new("#{API_COUNT_URL}domain=#{domain}").get return [] unless response.success? JSON.parse(response.body, { symbolize_names: true }) end end
hunt()
click to toggle source
# File lib/email_hunter/count.rb, line 14 def hunt Struct.new(*data.keys).new(*data.values) end