Class: Rafflesia::EnvironmentRelease
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::EnvironmentRelease
- Defined in:
- lib/rafflesia/environment_releases/environment_release.rb
Constant Summary collapse
- HASH_ATTRS =
{ created_at: :created_at, environment_id: :environment_id, environment_spec_hash: :environment_spec_hash, id: :id, is_livemode: :is_livemode, metadata: :metadata, object: :object, protocol_id: :protocol_id, public_bundle_hash: :public_bundle_hash, release_hash: :release_hash, runtime_profiles: :runtime_profiles, sealed_bundle_hash: :sealed_bundle_hash, status: :status, task_count: :task_count, version: :version, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#environment_id ⇒ Object
Returns the value of attribute environment_id.
-
#environment_spec_hash ⇒ Object
Returns the value of attribute environment_spec_hash.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_livemode ⇒ Object
Returns the value of attribute is_livemode.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#protocol_id ⇒ Object
Returns the value of attribute protocol_id.
-
#public_bundle_hash ⇒ Object
Returns the value of attribute public_bundle_hash.
-
#release_hash ⇒ Object
Returns the value of attribute release_hash.
-
#runtime_profiles ⇒ Object
Returns the value of attribute runtime_profiles.
-
#sealed_bundle_hash ⇒ Object
Returns the value of attribute sealed_bundle_hash.
-
#status ⇒ Object
Returns the value of attribute status.
-
#task_count ⇒ Object
Returns the value of attribute task_count.
-
#version ⇒ Object
Returns the value of attribute version.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ EnvironmentRelease
constructor
A new instance of EnvironmentRelease.
Constructor Details
#initialize(json) ⇒ EnvironmentRelease
Returns a new instance of EnvironmentRelease.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 45 def initialize(json) super() hash = self.class.normalize(json) @created_at = hash[:created_at] @environment_id = hash[:environment_id] @environment_spec_hash = hash[:environment_spec_hash] @id = hash[:id] @is_livemode = hash[:is_livemode] @metadata = hash[:metadata] || {} @object = hash[:object] @protocol_id = hash[:protocol_id] @public_bundle_hash = hash[:public_bundle_hash] @release_hash = hash[:release_hash] @runtime_profiles = (hash[:runtime_profiles] || []).map { |item| item ? Rafflesia::RuntimeProfile.new(item) : nil } @sealed_bundle_hash = hash[:sealed_bundle_hash] @status = hash[:status] @task_count = hash[:task_count] @version = hash[:version] @warnings = (hash[:warnings] || []) end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def created_at @created_at end |
#environment_id ⇒ Object
Returns the value of attribute environment_id.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def environment_id @environment_id end |
#environment_spec_hash ⇒ Object
Returns the value of attribute environment_spec_hash.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def environment_spec_hash @environment_spec_hash end |
#id ⇒ Object
Returns the value of attribute id.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def id @id end |
#is_livemode ⇒ Object
Returns the value of attribute is_livemode.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def is_livemode @is_livemode end |
#metadata ⇒ Object
Returns the value of attribute metadata.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def @metadata end |
#object ⇒ Object
Returns the value of attribute object.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def object @object end |
#protocol_id ⇒ Object
Returns the value of attribute protocol_id.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def protocol_id @protocol_id end |
#public_bundle_hash ⇒ Object
Returns the value of attribute public_bundle_hash.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def public_bundle_hash @public_bundle_hash end |
#release_hash ⇒ Object
Returns the value of attribute release_hash.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def release_hash @release_hash end |
#runtime_profiles ⇒ Object
Returns the value of attribute runtime_profiles.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def runtime_profiles @runtime_profiles end |
#sealed_bundle_hash ⇒ Object
Returns the value of attribute sealed_bundle_hash.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def sealed_bundle_hash @sealed_bundle_hash end |
#status ⇒ Object
Returns the value of attribute status.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def status @status end |
#task_count ⇒ Object
Returns the value of attribute task_count.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def task_count @task_count end |
#version ⇒ Object
Returns the value of attribute version.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def version @version end |
#warnings ⇒ Object
Returns the value of attribute warnings.
27 28 29 |
# File 'lib/rafflesia/environment_releases/environment_release.rb', line 27 def warnings @warnings end |