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

Inherits:
Object
  • Object
show all
Defined in:
lib/compass/core/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.



76
77
78
79
80
81
82
# File 'lib/compass/core/sass_extensions/functions/image_size.rb', line 76

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.



74
75
76
# File 'lib/compass/core/sass_extensions/functions/image_size.rb', line 74

def bits
  @bits
end

#heightObject (readonly)

Returns the value of attribute height.



74
75
76
# File 'lib/compass/core/sass_extensions/functions/image_size.rb', line 74

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



74
75
76
# File 'lib/compass/core/sass_extensions/functions/image_size.rb', line 74

def width
  @width
end