=begin
= WebUnit::Link
  Copyright(C) 2001 yuichi TAKAHASHI
  $Id: link.rb,v 1.1.1.1 2003/01/21 11:50:40 yuichi Exp $
=end

require 'net/http'

module WebUnit

  class Link < HtmlElem

    attr_reader :href, :target, :onClick

    def initialize( ah )
      super( 'a', ah )
      @href = ah["href"]
      @target = ah["target"]
      @onClick = ah["onclick"]
    end

=begin
--- Link#read
      return a Response of getting of '@href'
=end

    def read
      Response::new.init_http( @href, "GET" ) if @href != nil
    end

  end

end
