Module: SsciInc
- Defined in:
- lib/ssci_inc/dsl.rb,
lib/ssci_inc/request.rb,
lib/ssci_inc/version.rb,
lib/ssci_inc/response.rb,
lib/ssci_inc/person_name.rb,
lib/ssci_inc/configuration.rb,
lib/ssci_inc/screening/model.rb,
lib/ssci_inc/screening/other.rb,
lib/ssci_inc/screening/credit.rb,
lib/ssci_inc/screening/social.rb,
lib/ssci_inc/screening/criminal.rb,
lib/ssci_inc/screening/eviction.rb,
lib/ssci_inc/screening/person_search.rb
Defined Under Namespace
Modules: DSL, Screening Classes: Configuration, PersonName, Request, Response
Constant Summary collapse
- VERSION =
'0.1.28'
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
Public: Configure ssci inc gem.
-
.load_config(file = "config/ssci_inc.yml") ⇒ Object
Public: Configure ssci inc gem with yaml file.
- .load_config_hash(h) ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
22 23 24 |
# File 'lib/ssci_inc/configuration.rb', line 22 def configuration @configuration end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
Public: Configure ssci inc gem
Examples
SsciInc.configure do |config|
base_uri: ********
report_uri: ********
site_identifier: ********
account_code: ********
user_name: ********
password: ********
end
41 42 43 |
# File 'lib/ssci_inc/configuration.rb', line 41 def self.configure yield(configuration) end |
.load_config(file = "config/ssci_inc.yml") ⇒ Object
Public: Configure ssci inc gem with yaml file
file - The name of the file to parse. (optional)
Defaults to "config/ssci_inc.yml".
Examples
SsciInc.load_config("ssci_inc.yml")
53 54 55 56 57 58 |
# File 'lib/ssci_inc/configuration.rb', line 53 def self.load_config(file="config/ssci_inc.yml") if File.exists?(file) h = YAML::load(IO.read(file)) load_config_hash(h) end end |
.load_config_hash(h) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/ssci_inc/configuration.rb', line 60 def self.load_config_hash(h) configure do |config| h.each do |k,v| config.send("#{k}=", v) if config.respond_to?("#{k}=") end end end |