Method: Twimage::Image#initialize
- Defined in:
- lib/twimage/image.rb
#initialize(options) ⇒ Image
Returns a new instance of Image.
6 7 8 9 10 11 12 13 14 |
# File 'lib/twimage/image.rb', line 6 def initialize() @service = [:service] @service_url = [:service_url] @image_url = [:image_url] extension = @image_url.match(/(\.\w+)(\?|$)/)[1] @tempfile = Tempfile.new(['twimage', extension]) @tempfile << [:image] end |