Class: SwissMatch::Directories::Service
- Inherits:
-
Object
- Object
- SwissMatch::Directories::Service
- Defined in:
- lib/swissmatch/directories/service.rb
Overview
Common directory service API.
Instance Method Summary collapse
-
#addresses(params, options = {}) ⇒ Object
Query for addresses matching a set of given search parameters.
-
#initialize(back_end, config = nil) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(back_end, config = nil) ⇒ Service
Returns a new instance of Service.
24 25 26 |
# File 'lib/swissmatch/directories/service.rb', line 24 def initialize(back_end, config=nil) @service = SwissMatch::Directories.service(back_end).from_config(config) end |
Instance Method Details
#addresses(params, options = {}) ⇒ Object
Query for addresses matching a set of given search parameters
Note that not all back-ends will treat these parameters with the same strictness. The tel.search.ch back-end for example will search for a last name anywhere in the name.
47 48 49 |
# File 'lib/swissmatch/directories/service.rb', line 47 def addresses(params, ={}) @service.addresses(params, ) end |