lib/mill/resources/image.rb in mill-0.1 vs lib/mill/resources/image.rb in mill-0.3
- old
+ new
@@ -1,18 +1,25 @@
-class Mill
+module Mill
class Resource
class Image < Resource
include HTMLHelpers
+ FileTypes = %w{
+ image/gif
+ image/jpeg
+ image/png
+ image/tiff
+ image/vnd.microsoft.icon
+ image/x-icon
+ image/svg
+ image/svg+xml
+ }
+
attr_accessor :width
attr_accessor :height
-
- def self.type
- :image
- end
def load
info = ImageSize.path(@input_file.to_s)
@width, @height = *info.size
super
\ No newline at end of file