How do you pass arguments to class << self
in Ruby? I have a snippet I'm working with below and I am trying to generate a picture using RMagick.
#!/usr/bin/env ruby
%w[ rubygems RMagick ].each{|l| require l }
%w[ Magick ].each{|i| require i }
module ImgGen
class << self
def start
stripes = ImageList.new
puts "hi"
end
end
end
WIDTH=650
HEIGHT=40
FILENAME="output.png"
FONT="winvga1.ttf"
ImgGen.start(WIDTH, HEIGHT, FILENAME, FONT)