Class: Compass::Core::SassExtensions::Functions::ImageSize::JPEG
- Inherits:
-
Object
- Object
- Compass::Core::SassExtensions::Functions::ImageSize::JPEG
- Defined in:
- lib/compass/core/sass_extensions/functions/image_size.rb
Instance Attribute Summary collapse
-
#bits ⇒ Object
readonly
Returns the value of attribute bits.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(file) ⇒ JPEG
constructor
A new instance of JPEG.
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
#bits ⇒ Object (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 |
#height ⇒ Object (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 |
#width ⇒ Object (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 |