Class: AsciiImage
- Inherits:
-
Object
- Object
- AsciiImage
- Defined in:
- lib/honeybii/ascii_image.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ascii ⇒ Object
Returns the value of attribute ascii.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(image_filename, point_size) ⇒ AsciiImage
constructor
A new instance of AsciiImage.
- #to_s ⇒ Object
Constructor Details
#initialize(image_filename, point_size) ⇒ AsciiImage
Returns a new instance of AsciiImage.
7 8 9 10 11 |
# File 'lib/honeybii/ascii_image.rb', line 7 def initialize(image_filename, point_size) @raw = Magick::ImageList.new(image_filename).first @point_size = point_size @ascii = '' end |
Instance Attribute Details
#ascii ⇒ Object
Returns the value of attribute ascii.
5 6 7 |
# File 'lib/honeybii/ascii_image.rb', line 5 def ascii @ascii end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/honeybii/ascii_image.rb', line 4 def raw @raw end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/honeybii/ascii_image.rb', line 13 def to_s unless @ascii.empty? @ascii else super end end |