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

- (Location) initialize(attributes = {})



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

- (Object) latitude

Returns the value of attribute latitude



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

def latitude
  @latitude
end

- (Object) longitude

Returns the value of attribute longitude



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

def longitude
  @longitude
end

Instance Method Details

- (Object) to_hash(options = {})



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