Class: Leaflet::Draw::Rails::Testing::Shape

Inherits:
Object
  • Object
show all
Defined in:
lib/leaflet-draw-rails/shape.rb

Direct Known Subclasses

Circle, Marker, Polygon, Polyline, Rectangle

Instance Method Summary collapse

Constructor Details

#initialize(points) ⇒ Shape

Returns a new instance of Shape.



9
10
11
# File 'lib/leaflet-draw-rails/shape.rb', line 9

def initialize(points)
  @points = points
end

Instance Method Details

#on(map) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/leaflet-draw-rails/shape.rb', line 13

def on(map)
  @map = map
  @browser = Browser.new(@map)

  choose_tool!
  draw!
end