Class: Thanos::Thumbnail
- Inherits:
-
Object
- Object
- Thanos::Thumbnail
- Defined in:
- lib/thanos/resources/thumbnail.rb
Instance Attribute Summary collapse
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(data) ⇒ Thumbnail
constructor
A new instance of Thumbnail.
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
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
3 4 5 |
# File 'lib/thanos/resources/thumbnail.rb', line 3 def extension @extension end |
#full_path ⇒ Object (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 |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/thanos/resources/thumbnail.rb', line 3 def path @path end |