Class: Aureus::Components::SimpleMap
- Inherits:
-
Renderable
- Object
- Renderable
- Aureus::Components::SimpleMap
- Defined in:
- lib/aureus/components/simple_map.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ SimpleMap
constructor
A new instance of SimpleMap.
- #render ⇒ Object
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
#initialize(args) ⇒ SimpleMap
Returns a new instance of SimpleMap.
4 5 6 |
# File 'lib/aureus/components/simple_map.rb', line 4 def initialize(args) init args, { height: 300, zoom: 13 } end |
Instance Method Details
#render ⇒ Object
8 9 10 11 12 |
# File 'lib/aureus/components/simple_map.rb', line 8 def render if @options[:longitude] and @options[:latitude] content_tag('div', nil, class: 'aureus-simple-map', data: @options ) end end |