class Strava::V2::Segment

Attributes

average_grade[R]
climb_category[R]
efforts[R]
end_latlng[R]
id[R]
name[R]
start_latlng[R]

Public Class Methods

new(jb, ejb) click to toggle source

include the efforts in the segment, if applicable jb - the json for the segment ejb - the json for the efforts, in a list

# File lib/strava/v2/models/segment.rb, line 12
def initialize(jb, ejb)
  @id = jb["id"]
  @name = jb["name"]
  @climb_category = jb["climb_category"]
  @start_latlng = jb["start_latlng"]
  @end_latlng = jb["end_latlng"]
  @average_grade = jb["avg_grade"]
  @efforts = []
  ejb.each { |effort_json|
    @efforts.push(Effort.new(effort_json))
  }
end