Class: Twitter::GeoFactory

Inherits:
Factory
  • Object
show all
Defined in:
lib/twitter/geo_factory.rb

Overview

Factory for creating geo objects based on type

Class Method Summary collapse

Class Method Details

.new(attrs = {}) ⇒ Twitter::Geo

Constructs a new geo object

Examples:

Twitter::GeoFactory.new(type: "Point", coordinates: [1.0, 2.0])

Parameters:

  • attrs (Hash) (defaults to: {})

    The attributes hash with a :type key

Returns:

Raises:

  • (IndexError)

    Error raised when argument is missing a :type key



17
18
19
# File 'lib/twitter/geo_factory.rb', line 17

def new(attrs = {})
  super(:type, Geo, attrs)
end