Module: TinyAppstoreConnect::Model

Included in:
App, AppStoreVersion, AppStoreVersionSubmission, Build, BundleId, BundleIdCapability, Certificate, Device, Profile, User, UserRole
Defined in:
lib/tiny_appstore_connect/models/app.rb,
lib/tiny_appstore_connect/model.rb,
lib/tiny_appstore_connect/models/user.rb,
lib/tiny_appstore_connect/models/build.rb,
lib/tiny_appstore_connect/models/device.rb,
lib/tiny_appstore_connect/models/profile.rb,
lib/tiny_appstore_connect/models/bundle_id.rb,
lib/tiny_appstore_connect/models/certificate.rb,
lib/tiny_appstore_connect/models/app_store_version.rb,
lib/tiny_appstore_connect/models/pre_release_version.rb,
lib/tiny_appstore_connect/models/bundle_id_capability.rb,
lib/tiny_appstore_connect/models/app_store_version_submission.rb

Overview

Inspried from fastlane/spaceship License by fastlane team (github.com/fastlane/fastlane)

Defined Under Namespace

Classes: App, AppStoreVersion, AppStoreVersionSubmission, Build, BundleId, BundleIdCapability, Certificate, Device, Profile, User, UserRole

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



30
31
32
# File 'lib/tiny_appstore_connect/model.rb', line 30

def id
  @id
end

#includedObject

Returns the value of attribute included.



31
32
33
# File 'lib/tiny_appstore_connect/model.rb', line 31

def included
  @included
end

#rateObject (readonly)

Returns the value of attribute rate.



32
33
34
# File 'lib/tiny_appstore_connect/model.rb', line 32

def rate
  @rate
end

Class Method Details

.included(base) ⇒ Object



24
25
26
27
28
# File 'lib/tiny_appstore_connect/model.rb', line 24

def self.included(base)
  Parser.types ||= []
  Parser.types << base
  base.extend(Parser)
end

Instance Method Details

#initialize(id, attributes, rate) ⇒ Object



34
35
36
37
38
39
# File 'lib/tiny_appstore_connect/model.rb', line 34

def initialize(id, attributes, rate)
  @id = id
  @rate = rate

  update_attributes(attributes)
end

#update_attributes(attributes) ⇒ Object



41
42
43
44
45
46
# File 'lib/tiny_appstore_connect/model.rb', line 41

def update_attributes(attributes)
  (attributes || []).each do |key, value|
    method = "#{underscore(key.to_s)}=".to_sym
    self.send(method, value) if self.respond_to?(method)
  end
end

#update_include(included) ⇒ Object



48
49
50
# File 'lib/tiny_appstore_connect/model.rb', line 48

def update_include(included)
  @include = included
end