class AnyMailFinder::Person
Constants
- ACCEPTABLE_KEYS
- API_PATH
Attributes
options[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/any_mail_finder/person.rb, line 15 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/person.rb, line 22 def find_email post path, query_params end
Private Instance Methods
path()
click to toggle source
# File lib/any_mail_finder/person.rb, line 32 def path API_HOST + API_PATH end
query_params()
click to toggle source
# File lib/any_mail_finder/person.rb, line 28 def query_params ACCEPTABLE_KEYS.inject({}) { |hash, key| hash.merge!(key => options[key]) } end