Class: RCScriptClient

Inherits:
Object
  • Object
show all
Includes:
REXML
Defined in:
lib/rcscript-client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ RCScriptClient

Returns a new instance of RCScriptClient.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rcscript-client.rb', line 15

def initialize(opts={})        
  
  o = {:hostname => 'rscript.heroku.com', :package => '', https: false}\
      .merge(opts)
  @hostname = o[:hostname]
  @package = o[:package]
  @protocol = o[:https] ? 'https' : 'http'
  
  if @package.length > 0 then
    jobs_to_methods(@package)    
    init_content_types
  end   

end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



12
13
14
# File 'lib/rcscript-client.rb', line 12

def doc
  @doc
end

#packageObject

Returns the value of attribute package.



13
14
15
# File 'lib/rcscript-client.rb', line 13

def package
  @package
end

#resultObject (readonly)

Returns the value of attribute result.



12
13
14
# File 'lib/rcscript-client.rb', line 12

def result
  @result
end

#textObject (readonly)

Returns the value of attribute text.



12
13
14
# File 'lib/rcscript-client.rb', line 12

def text
  @text
end