Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- class Webby::Resources::Resource
- def thumb_destination
- ::File.join(::Webby.site.output_dir, directory, 'thumbs', filename)
- return @thumb_destination unless @thumb_destination.nil?
- @thumb_destination = ::File.join(::Webby.site.output_dir, directory, "thumbnails", filename)
- ext = extension
- unless ext.nil? or ext.empty?
- @thumb_destination << '-thumb.' << ext
- end
- @thumb_destination
- end
- def thumb_url
- return @thumb_url unless @thumb_url.nil?
- @thumb_url = thumb_destination.sub(::Webby.site.output_dir, '')
- end
- end
- %>
Add Comment
Please, Sign In to add comment