Sha256: b721a02d9b1267705deca929f34a5d9479728939a6c7a4583089ba2b3e9d1d48

Contents?: true

Size: 1.13 KB

Versions: 1134

Compression:

Stored size: 1.13 KB

Contents

module Supply
  class Listing
    attr_reader :language

    attr_accessor :title
    attr_accessor :short_description
    attr_accessor :full_description
    attr_accessor :video

    # Initializes the listing to use the given api client, language, and fills it with the current listing if available
    def initialize(google_api, language, source_listing = nil)
      @google_api = google_api
      @language = language

      if source_listing # this might be nil, e.g. when creating a new locale
        self.title = source_listing.title
        self.short_description = source_listing.short_description
        self.full_description = source_listing.full_description
        self.video = source_listing.video
      end
    end

    # Updates the listing in the current edit
    def save
      @google_api.update_listing_for_language(language: language,
                                              title: title,
                                              short_description: short_description,
                                              full_description: full_description,
                                              video: video)
    end
  end
end

Version data entries

1,134 entries across 1,134 versions & 6 rubygems

Version Path
fastlane-2.138.0 supply/lib/supply/listing.rb
fastlane-2.137.0 supply/lib/supply/listing.rb
fastlane-2.136.0 supply/lib/supply/listing.rb
fastlane-2.135.2 supply/lib/supply/listing.rb
fastlane-2.135.1 supply/lib/supply/listing.rb
fastlane-2.135.0 supply/lib/supply/listing.rb
fastlane-2.134.0 supply/lib/supply/listing.rb
fastlane-2.133.0 supply/lib/supply/listing.rb
fastlane-2.132.0 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190930200026 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190929200020 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190928200106 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190927200017 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190926200023 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190925200108 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190924200030 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190923200017 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190922200014 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190921200021 supply/lib/supply/listing.rb
fastlane-2.132.0.beta.20190920200012 supply/lib/supply/listing.rb