Class: Resizing::PublicId

Inherits:
Object
  • Object
show all
Defined in:
lib/resizing/public_id.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


8
9
10
# File 'lib/resizing/public_id.rb', line 8

def empty?
  @public_id.to_s.empty?
end

#filenameObject

temporary



25
26
27
# File 'lib/resizing/public_id.rb', line 25

def filename
  image_id
end

#identifierObject



29
30
31
# File 'lib/resizing/public_id.rb', line 29

def identifier
  "/projects/#{project_id}/upload/images/#{image_id}"
end

#image_idObject



12
13
14
# File 'lib/resizing/public_id.rb', line 12

def image_id
  parsed[:image_id] if parsed
end

#project_idObject



16
17
18
# File 'lib/resizing/public_id.rb', line 16

def project_id
  parsed[:project_id] if parsed
end

#to_sObject



33
34
35
# File 'lib/resizing/public_id.rb', line 33

def to_s
  @public_id.to_s
end

#versionObject



20
21
22
# File 'lib/resizing/public_id.rb', line 20

def version
  parsed[:version] if parsed
end