Class: Compass::SassExtensions::Functions::ImageSize::JPEG

Inherits:
Object
  • Object
show all
Defined in:
lib/compass/sass_extensions/functions/image_size.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ JPEG

Returns a new instance of JPEG.



72
73
74
75
76
77
78
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 72

def initialize(file)
  if file.kind_of? IO
    examine(file)
  else
    File.open(file, 'rb') { |io| examine(io) }
  end
end

Instance Attribute Details

#bitsObject (readonly)

Returns the value of attribute bits.



70
71
72
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 70

def bits
  @bits
end

#heightObject (readonly)

Returns the value of attribute height.



70
71
72
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 70

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



70
71
72
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 70

def width
  @width
end