Class: RScriptBase

Inherits:
Object
  • Object
show all
Defined in:
lib/rscript_base.rb

Direct Known Subclasses

RScript

Instance Method Summary collapse

Constructor Details

#initialize(debug: false) ⇒ RScriptBase

Returns a new instance of RScriptBase.



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

def initialize(debug: false)
  @debug = debug
end

Instance Method Details

#read(doc) ⇒ Object



15
16
17
# File 'lib/rscript_base.rb', line 15

def read(doc)
  doc.root.xpath('//script').map {|s| run_script(s)}.join(';')
end