Class: Web::Unit::JSciriptOpenObject

Inherits:
HtmlElem show all
Defined in:
lib/web/unit/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.



14
15
16
17
18
19
# File 'lib/web/unit/jscript.rb', line 14

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.



12
13
14
# File 'lib/web/unit/jscript.rb', line 12

def file
  @file
end

#targetObject (readonly)

Returns the value of attribute target.



12
13
14
# File 'lib/web/unit/jscript.rb', line 12

def target
  @target
end

#urlObject (readonly)

Returns the value of attribute url.



12
13
14
# File 'lib/web/unit/jscript.rb', line 12

def url
  @url
end

Instance Method Details

#readObject

— JSciriptOpenObject#read

return a Response of getting of '@url'


26
27
28
# File 'lib/web/unit/jscript.rb', line 26

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