Class: Yahoo::Placemaker::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo/placemaker/scope.rb

Direct Known Subclasses

AdministrativeScope, GeographicScope, LocalScope

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Scope) initialize(json)

A new instance of Scope



9
10
11
12
13
14
# File 'lib/yahoo/placemaker/scope.rb', line 9

def initialize(json)
  @centroid = Yahoo::Placemaker::LatLng.new(json['centroid'])
  @woe_id = json['woeId']
  @type = json['type']
  @name = json['name']
end

Instance Attribute Details

- (Object) centroid

Returns the value of attribute centroid



7
8
9
# File 'lib/yahoo/placemaker/scope.rb', line 7

def centroid
  @centroid
end

- (Object) name

Returns the value of attribute name



7
8
9
# File 'lib/yahoo/placemaker/scope.rb', line 7

def name
  @name
end

- (Object) type

Returns the value of attribute type



7
8
9
# File 'lib/yahoo/placemaker/scope.rb', line 7

def type
  @type
end

- (Object) woe_id

Returns the value of attribute woe_id



7
8
9
# File 'lib/yahoo/placemaker/scope.rb', line 7

def woe_id
  @woe_id
end