Class: Resizing::PublicId
- Inherits:
-
Object
- Object
- Resizing::PublicId
- Defined in:
- lib/resizing/public_id.rb
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#filename ⇒ Object
temporary.
- #identifier ⇒ Object
- #image_id ⇒ Object
-
#initialize(public_id) ⇒ PublicId
constructor
A new instance of PublicId.
- #project_id ⇒ Object
- #to_s ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(public_id) ⇒ PublicId
Returns a new instance of PublicId.
3 4 5 6 |
# File 'lib/resizing/public_id.rb', line 3 def initialize public_id @public_id = public_id parsed end |
Instance Method Details
#empty? ⇒ Boolean
8 9 10 |
# File 'lib/resizing/public_id.rb', line 8 def empty? @public_id.to_s.empty? end |
#filename ⇒ Object
temporary
25 26 27 |
# File 'lib/resizing/public_id.rb', line 25 def filename image_id end |
#identifier ⇒ Object
29 30 31 |
# File 'lib/resizing/public_id.rb', line 29 def identifier "/projects/#{project_id}/upload/images/#{image_id}" end |
#image_id ⇒ Object
12 13 14 |
# File 'lib/resizing/public_id.rb', line 12 def image_id parsed[:image_id] if parsed end |
#project_id ⇒ Object
16 17 18 |
# File 'lib/resizing/public_id.rb', line 16 def project_id parsed[:project_id] if parsed end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/resizing/public_id.rb', line 33 def to_s @public_id.to_s end |
#version ⇒ Object
20 21 22 |
# File 'lib/resizing/public_id.rb', line 20 def version parsed[:version] if parsed end |