class GooglePlus::GeoFactory
Public Class Methods
new(geo={})
click to toggle source
Instantiates a new geo object
@param attrs [Hash] @raise [ArgumentError] Error
raised when supplied argument is missing a type key. @return [GooglePlus::Point, GooglePlus::Polygon]
# File lib/google_plus/geo_factory.rb, line 12 def self.new(geo={}) type = geo['type'] if type GooglePlus.const_get(type.capitalize.to_sym).new(geo) else raise ArgumentError, "argument must have a type key" end end