Class: GeocodeInterpretation

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Thrift::Struct, Thrift::Struct_Union, Underscored
Defined in:
lib/twofishes/result.rb,
lib/thrift/geocoder_types.rb,
lib/twofishes/underscored.rb

Constant Summary collapse

WHAT =
1
WHERE =
2
FEATURE =
3
PARENTS =
4
SCORINGFEATURES_DEPRECATED =
5
SCORES =
6
DEBUGINFO =
7
PARENTLONGIDS =
8
FIELDS =
{
  WHAT => {:type => ::Thrift::Types::STRING, :name => 'what', :optional => true},
  WHERE => {:type => ::Thrift::Types::STRING, :name => 'where', :optional => true},
  FEATURE => {:type => ::Thrift::Types::STRUCT, :name => 'feature', :class => ::GeocodeFeature},
  PARENTS => {:type => ::Thrift::Types::LIST, :name => 'parents', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true},
  SCORINGFEATURES_DEPRECATED => {:type => ::Thrift::Types::STRUCT, :name => 'scoringFeatures_DEPRECATED', :class => ::ScoringFeatures, :optional => true},
  SCORES => {:type => ::Thrift::Types::STRUCT, :name => 'scores', :class => ::InterpretationScoringFeatures, :optional => true},
  DEBUGINFO => {:type => ::Thrift::Types::STRUCT, :name => 'debugInfo', :class => ::InterpretationDebugInfo, :optional => true},
  PARENTLONGIDS => {:type => ::Thrift::Types::LIST, :name => 'parentLongIds', :element => {:type => ::Thrift::Types::I64}, :optional => true}
}

Instance Method Summary collapse

Methods included from Underscored

included

Instance Method Details

#coordinatesObject



29
30
31
# File 'lib/twofishes/result.rb', line 29

def coordinates
  [lat, lng]
end

#country_codeObject



17
18
19
# File 'lib/twofishes/result.rb', line 17

def country_code
  cc
end

#latObject



21
22
23
# File 'lib/twofishes/result.rb', line 21

def lat
  geometry.center.lat
end

#lngObject



25
26
27
# File 'lib/twofishes/result.rb', line 25

def lng
  geometry.center.lng
end

#struct_fieldsObject



468
# File 'lib/thrift/geocoder_types.rb', line 468

def struct_fields; FIELDS; end

#validateObject



470
471
# File 'lib/thrift/geocoder_types.rb', line 470

def validate
end