Sha256: 58d3ed1421ddc23d35a366b3e933ade099b4ad24b7d40d0d385df622fd5e74ca

Contents?: true

Size: 639 Bytes

Versions: 8

Compression:

Stored size: 639 Bytes

Contents

require 'connector_kit/models/model'

module ConnectorKit
  # Simple model class for representing Builds
  class Build < Model
    attr_reader :expired,
                :processing_state,
                :version,
                :uploaded_date,
                :expiration_date

    def initialize(options)
      super(options)

      attrs = options['attributes']
      @expired = attrs['expired']
      @processing_state = attrs['processingState']
      @version = attrs['version']
      @uploaded_date = Time.parse(attrs['uploadedDate']).getlocal
      @expiration_date = Time.parse(attrs['expirationDate']).getlocal
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
appstore_kit_fork-0.0.5 lib/connector_kit/models/build.rb
appstore_kit_fork-0.0.4 lib/connector_kit/models/build.rb
appstore_kit_fork-0.0.3 lib/connector_kit/models/build.rb
appstore_kit_fork-0.0.2 lib/connector_kit/models/build.rb
appstore_kit_fork-0.0.1 lib/connector_kit/models/build.rb
connector_kit_fork-0.3.2 lib/connector_kit/models/build.rb
connector_kit_fork-0.3.1 lib/connector_kit/models/build.rb
connector_kit-0.3.0 lib/connector_kit/models/build.rb