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
-
.address_to_lat_lng_proc ⇒ Object
Returns the value of attribute address_to_lat_lng_proc.
-
.address_to_s_proc ⇒ Object
Returns the value of attribute address_to_s_proc.
-
.container_class ⇒ Object
Returns the value of attribute container_class.
-
.include_js_proc ⇒ Object
Returns the value of attribute include_js_proc.
-
.static_map_class ⇒ Object
Returns the value of attribute static_map_class.
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .install_barista_framework! ⇒ Object
- .install_helper! ⇒ Object
- .install_js! ⇒ Object
Class Attribute Details
.address_to_lat_lng_proc ⇒ Object
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_proc ⇒ Object
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_class ⇒ Object
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_proc ⇒ Object
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_class ⇒ Object
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
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. coffeescript_dir = File.("../../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.("../../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 |