Class: Image
- Inherits:
-
Object
- Object
- Image
- Defined in:
- lib/image.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
readonly
Returns the value of attribute channels.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize ⇒ Image
constructor
A new instance of Image.
- #read(path) ⇒ Object
- #write(path) ⇒ Object
Constructor Details
#initialize ⇒ Image
Returns a new instance of Image.
7 8 9 10 11 12 |
# File 'lib/image.rb', line 7 def initialize() @data = [] @height = 0 @width = 0 @channels = 0 end |
Instance Attribute Details
#channels ⇒ Object (readonly)
Returns the value of attribute channels.
6 7 8 |
# File 'lib/image.rb', line 6 def channels @channels end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/image.rb', line 6 def data @data end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
6 7 8 |
# File 'lib/image.rb', line 6 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
6 7 8 |
# File 'lib/image.rb', line 6 def width @width end |
Instance Method Details
#read(path) ⇒ Object
14 15 16 |
# File 'lib/image.rb', line 14 def read(path) end |
#write(path) ⇒ Object
18 19 |
# File 'lib/image.rb', line 18 def write(path) end |