Class: DailyImage::Image
- Inherits:
-
Object
- Object
- DailyImage::Image
- Defined in:
- lib/daily_image/image.rb
Instance Method Summary collapse
- #draw_image ⇒ Object
-
#initialize(width = 600, height = 800, date: Date.today) ⇒ Image
constructor
A new instance of Image.
Constructor Details
#initialize(width = 600, height = 800, date: Date.today) ⇒ Image
Returns a new instance of Image.
5 6 7 8 9 |
# File 'lib/daily_image/image.rb', line 5 def initialize(width = 600, height = 800, date: Date.today) @width = width @height = height @date = date end |
Instance Method Details
#draw_image ⇒ Object
11 12 13 14 15 16 |
# File 'lib/daily_image/image.rb', line 11 def draw_image image = Vips::Image.black(@width, @height) image = draw_top_half(image) draw_down_half(image) end |