class Spaceship::TestFlight::BuildTrains
Public Class Methods
all(app_id: nil, platform: nil, retry_count: 3)
click to toggle source
BuildTrains
represent the collection of builds for a `train_version`
Note: builds returned by BuildTrains
are partially complete. Properties such as `exportCompliance`, `testInfo` and many others are not provided. It is the responsibility of Build
to lazy-load the necessary properties.
See `Spaceship::TestFlight::Build#reload`
# File spaceship/lib/spaceship/test_flight/build_trains.rb, line 15 def self.all(app_id: nil, platform: nil, retry_count: 3) filter_platform = Spaceship::ConnectAPI::Platform.map(platform) if platform connect_builds = Spaceship::ConnectAPI::Build.all( app_id: app_id, sort: "uploadedDate", platform: filter_platform ) trains = {} connect_builds.each do |connect_build| train_version = connect_build.app_version trains[train_version] ||= [] trains[train_version] << connect_build.to_testflight_build end self.new(trains) end
new(trains = {})
click to toggle source
# File spaceship/lib/spaceship/test_flight/build_trains.rb, line 33 def initialize(trains = {}) @trains = trains end
Public Instance Methods
get(key)
click to toggle source
# File spaceship/lib/spaceship/test_flight/build_trains.rb, line 37 def get(key) @trains[key] end
Also aliased as: []
values()
click to toggle source
# File spaceship/lib/spaceship/test_flight/build_trains.rb, line 42 def values @trains.values end
versions()
click to toggle source
# File spaceship/lib/spaceship/test_flight/build_trains.rb, line 46 def versions @trains.keys end