Method: MechanizeContent::Image#initialize
- Defined in:
- lib/mechanize_content/image.rb
#initialize(image, base_url) ⇒ Image
Returns a new instance of Image.
14 15 16 17 18 19 |
# File 'lib/mechanize_content/image.rb', line 14 def initialize(image, base_url) @src = URI.escape(image["src"]) @width = image["width"].to_i @height = image["height"].to_i @base_url = base_url end |