Class: DailyImage::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/daily_image/image.rb

Instance Method Summary collapse

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_imageObject



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