Module: MelissaData::Config

Included in:
MelissaData
Defined in:
lib/melissa_data/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#google_maps_api_keyString

Returns web smart id to be used.

Returns:

  • (String)

    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_idString

Returns web smart id to be used.

Returns:

  • (String)

    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']

Parameters:

  • [String] (api_key)

    web smart id to use

Yields:

  • (_self)

Yield Parameters:



23
24
25
# File 'lib/melissa_data/config.rb', line 23

def configure
  yield self if block_given?
end