Class: AppstoreKitFork::Build

Inherits:
Model
  • Object
show all
Defined in:
lib/appstore_kit_fork/models/build.rb

Overview

Simple model class for representing Builds

Instance Attribute Summary collapse

Attributes inherited from Model

#id

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Build

Returns a new instance of Build.



12
13
14
15
16
17
18
19
20
21
# File 'lib/appstore_kit_fork/models/build.rb', line 12

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

Instance Attribute Details

#expiration_dateObject (readonly)

Returns the value of attribute expiration_date.



6
7
8
# File 'lib/appstore_kit_fork/models/build.rb', line 6

def expiration_date
  @expiration_date
end

#expiredObject (readonly)

Returns the value of attribute expired.



6
7
8
# File 'lib/appstore_kit_fork/models/build.rb', line 6

def expired
  @expired
end

#processing_stateObject (readonly)

Returns the value of attribute processing_state.



6
7
8
# File 'lib/appstore_kit_fork/models/build.rb', line 6

def processing_state
  @processing_state
end

#uploaded_dateObject (readonly)

Returns the value of attribute uploaded_date.



6
7
8
# File 'lib/appstore_kit_fork/models/build.rb', line 6

def uploaded_date
  @uploaded_date
end

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/appstore_kit_fork/models/build.rb', line 6

def version
  @version
end