Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k@mail:~/craigslist$ ./img.rb
- ./img.rb:15:in `read_config': undefined method `variable_set' for ImgGen:Module (NoMethodError)
- from ./img.rb:15:in `each'
- from ./img.rb:15:in `read_config'
- from ./img.rb:9:in `start'
- from ./img.rb:22
- k@mail:~/craigslist$ cat img.rb
- #!/usr/bin/env ruby
- %w[ rubygems RMagick yaml ].each{|l| require l }
- include Magick
- module ImgGen
- class << self
- def start()
- read_config("img.yaml")
- stripes = ImageList.new
- puts "ohi #{width}"
- end
- def read_config(file)
- c=YAML.load_file(file)
- c["img"].each { |key, value| variable_set("#{key}", value) }
- end
- end
- end
- #canvas = Magick::Image.new(240, 300,
- # Magick::HatchFill.new('white','lightcyan2'))
- #gc = Magick::Draw.new
- ImgGen.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement