Class: FbGraph::Location

Inherits:
Object
  • Object
show all
Includes:
Comparison, Serialization
Defined in:
lib/fb_graph/location.rb

Direct Known Subclasses

Venue

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Serialization

#as_json, #to_json

Methods included from Comparison

#==

Constructor Details

#initialize(attributes = {}) ⇒ Location

Returns a new instance of Location.



8
9
10
11
# File 'lib/fb_graph/location.rb', line 8

def initialize(attributes = {})
  @latitude  = attributes[:latitude]
  @longitude = attributes[:longitude]
end

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude.



6
7
8
# File 'lib/fb_graph/location.rb', line 6

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



6
7
8
# File 'lib/fb_graph/location.rb', line 6

def longitude
  @longitude
end

Instance Method Details

#to_hash(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/fb_graph/location.rb', line 13

def to_hash(options = {})
  {
    :latitude  => self.latitude,
    :longitude => self.longitude
  }
end