Class: WebUnit::JSciriptOpenObject

Inherits:
HtmlElem show all
Defined in:
lib/webunit/jscript.rb

Instance Attribute Summary collapse

Attributes inherited from HtmlElem

#array, #attrs, #children, #data, #name, #tag

Instance Method Summary collapse

Methods inherited from HtmlElem

#append, #extract, #find, #has?, #inspect, #print, #readlink, #search

Constructor Details

#initialize(ah) ⇒ JSciriptOpenObject

Returns a new instance of JSciriptOpenObject.



13
14
15
16
17
18
# File 'lib/webunit/jscript.rb', line 13

def initialize( ah )
  super( 'open', ah )
  @url = ah['url']
  @file = ah['file']
  @target = ah['target']
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



11
12
13
# File 'lib/webunit/jscript.rb', line 11

def file
  @file
end

#targetObject (readonly)

Returns the value of attribute target.



11
12
13
# File 'lib/webunit/jscript.rb', line 11

def target
  @target
end

#urlObject (readonly)

Returns the value of attribute url.



11
12
13
# File 'lib/webunit/jscript.rb', line 11

def url
  @url
end

Instance Method Details

#readObject

— JSciriptOpenObject#read

return a Response of getting of '@url'


25
26
27
# File 'lib/webunit/jscript.rb', line 25

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