Module: BHM::GoogleMaps

Defined in:
lib/bhm/google_maps.rb,
lib/bhm/google_maps/helper.rb,
lib/bhm/google_maps/builder.rb,
lib/bhm/google_maps/version.rb,
lib/bhm/google_maps/static_map.rb

Defined Under Namespace

Modules: Helper Classes: Builder, Railtie, StaticMap

Constant Summary collapse

VERSION =
"0.3.0".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.address_to_lat_lng_procObject

Returns the value of attribute address_to_lat_lng_proc.



11
12
13
# File 'lib/bhm/google_maps.rb', line 11

def address_to_lat_lng_proc
  @address_to_lat_lng_proc
end

.address_to_s_procObject

Returns the value of attribute address_to_s_proc.



11
12
13
# File 'lib/bhm/google_maps.rb', line 11

def address_to_s_proc
  @address_to_s_proc
end

.container_classObject

Returns the value of attribute container_class.



11
12
13
# File 'lib/bhm/google_maps.rb', line 11

def container_class
  @container_class
end

.include_js_procObject

Returns the value of attribute include_js_proc.



11
12
13
# File 'lib/bhm/google_maps.rb', line 11

def include_js_proc
  @include_js_proc
end

.static_map_classObject

Returns the value of attribute static_map_class.



11
12
13
# File 'lib/bhm/google_maps.rb', line 11

def static_map_class
  @static_map_class
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



21
22
23
# File 'lib/bhm/google_maps.rb', line 21

def self.configure
  yield self if block_given?
end

.install_barista_framework!Object



36
37
38
39
# File 'lib/bhm/google_maps.rb', line 36

def self.install_barista_framework!
  coffeescript_dir = File.expand_path("../../coffeescripts/", File.dirname(__FILE__))
  Barista::Framework.register 'bhm-google-maps', coffeescript_dir
end

.install_helper!Object



25
26
27
# File 'lib/bhm/google_maps.rb', line 25

def self.install_helper!
  ::ActionView::Base.send(:include, BHM::GoogleMaps::Helper)
end

.install_js!Object



29
30
31
32
33
34
# File 'lib/bhm/google_maps.rb', line 29

def self.install_js!
  from = File.expand_path("../../javascripts/gmap.js", File.dirname(__FILE__))
  if File.exist?(from) && defined?(Rails.root)
    FileUtils.cp from, Rails.root.join("public", "javascripts", "gmap.js")
  end
end