Class: Sprites::Sprite
- Inherits:
-
Object
- Object
- Sprites::Sprite
- Defined in:
- lib/sprites/sprite.rb
Overview
A sprite instance.
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp.
-
#environment_version ⇒ String?
readonly
Environment version.
-
#id ⇒ String
readonly
Unique sprite ID.
-
#name ⇒ String
readonly
Sprite name.
-
#organization ⇒ String
readonly
Organization slug.
-
#status ⇒ String
readonly
Status (“cold”, “warm”).
-
#updated_at ⇒ String
readonly
Last update timestamp.
-
#url ⇒ String
readonly
Public URL for the sprite.
-
#url_settings ⇒ Hash
readonly
URL authentication settings.
-
#version ⇒ String?
readonly
Sprite version.
Class Method Summary collapse
- .to_proc ⇒ Object private
Instance Method Summary collapse
-
#initialize(id:, name:, status:, version:, url:, created_at:, updated_at:, organization:, url_settings:, environment_version:) ⇒ Sprite
constructor
A new instance of Sprite.
Constructor Details
#initialize(id:, name:, status:, version:, url:, created_at:, updated_at:, organization:, url_settings:, environment_version:) ⇒ Sprite
Returns a new instance of Sprite.
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/sprites/sprite.rb', line 39 def initialize(id:, name:, status:, version:, url:, created_at:, updated_at:, organization:, url_settings:, environment_version:) @id = id @name = name @status = status @version = version @url = url @created_at = created_at @updated_at = updated_at @organization = organization @url_settings = url_settings @environment_version = environment_version end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Returns creation timestamp.
25 26 27 |
# File 'lib/sprites/sprite.rb', line 25 def created_at @created_at end |
#environment_version ⇒ String? (readonly)
Returns environment version.
37 38 39 |
# File 'lib/sprites/sprite.rb', line 37 def environment_version @environment_version end |
#id ⇒ String (readonly)
Returns unique sprite ID.
10 11 12 |
# File 'lib/sprites/sprite.rb', line 10 def id @id end |
#name ⇒ String (readonly)
Returns sprite name.
13 14 15 |
# File 'lib/sprites/sprite.rb', line 13 def name @name end |
#organization ⇒ String (readonly)
Returns organization slug.
31 32 33 |
# File 'lib/sprites/sprite.rb', line 31 def organization @organization end |
#status ⇒ String (readonly)
Returns status (“cold”, “warm”).
16 17 18 |
# File 'lib/sprites/sprite.rb', line 16 def status @status end |
#updated_at ⇒ String (readonly)
Returns last update timestamp.
28 29 30 |
# File 'lib/sprites/sprite.rb', line 28 def updated_at @updated_at end |
#url ⇒ String (readonly)
Returns public URL for the sprite.
22 23 24 |
# File 'lib/sprites/sprite.rb', line 22 def url @url end |
#url_settings ⇒ Hash (readonly)
Returns URL authentication settings.
34 35 36 |
# File 'lib/sprites/sprite.rb', line 34 def url_settings @url_settings end |
#version ⇒ String? (readonly)
Returns sprite version.
19 20 21 |
# File 'lib/sprites/sprite.rb', line 19 def version @version end |
Class Method Details
.to_proc ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 |
# File 'lib/sprites/sprite.rb', line 7 def self.to_proc = ->(attrs) { new(**attrs) } |