class AnyMailFinder::Company
Constants
- ACCEPTABLE_KEYS
- API_PATH
Attributes
options[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/any_mail_finder/company.rb, line 11 def initialize(options = {}) self.options = options.with_indifferent_access ACCEPTABLE_KEYS.each do |key| self.public_send("#{key}=", options[key]) end end
Public Instance Methods
find_email()
click to toggle source
# File lib/any_mail_finder/company.rb, line 18 def find_email post path, query_params end
Private Instance Methods
path()
click to toggle source
# File lib/any_mail_finder/company.rb, line 28 def path API_HOST + API_PATH end
query_params()
click to toggle source
# File lib/any_mail_finder/company.rb, line 24 def query_params ACCEPTABLE_KEYS.inject({}) { |hash, key| hash.merge!(key => options[key]) } end