Class: Thanos::Thumbnail

Inherits:
Object
  • Object
show all
Defined in:
lib/thanos/resources/thumbnail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Thumbnail

Returns a new instance of Thumbnail.



5
6
7
8
9
# File 'lib/thanos/resources/thumbnail.rb', line 5

def initialize(data)
  @path = data['path']
  @extension = data['extension']
  @full_path = @path + '.' + @extension
end

Instance Attribute Details

#extensionObject (readonly)

Returns the value of attribute extension.



3
4
5
# File 'lib/thanos/resources/thumbnail.rb', line 3

def extension
  @extension
end

#full_pathObject (readonly)

Returns the value of attribute full_path.



3
4
5
# File 'lib/thanos/resources/thumbnail.rb', line 3

def full_path
  @full_path
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/thanos/resources/thumbnail.rb', line 3

def path
  @path
end