Module: MelissaData::Config
- Included in:
- MelissaData
- Defined in:
- lib/melissa_data/config.rb
Instance Attribute Summary collapse
-
#google_maps_api_key ⇒ String
Web smart id to be used.
-
#web_smart_id ⇒ String
Web smart id to be used.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#google_maps_api_key ⇒ String
Returns web smart id to be used.
9 10 11 |
# File 'lib/melissa_data/config.rb', line 9 def google_maps_api_key @google_maps_api_key end |
#web_smart_id ⇒ String
Returns web smart id to be used.
9 10 11 |
# File 'lib/melissa_data/config.rb', line 9 def web_smart_id @web_smart_id end |
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/melissa_data/config.rb', line 3 def self.included(base) base.extend(self) end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Configures web_smart_id and property_api_url
Usage example:
MelissaData.configure do |config|
config.web_smart_id = ENV['MELISSA_DATA_WEB_SMART_ID']
config.google_maps_api_key = ENV['GOOGLE_MAPS_API_KEY']
end
Alternate way:
MelissaData.web_smart_id = ENV['MELISSA_DATA_WEB_SMART_ID']
MelissaData.google_maps_api_key = ENV['GOOGLE_MAPS_API_KEY']
23 24 25 |
# File 'lib/melissa_data/config.rb', line 23 def configure yield self if block_given? end |