Class: Casper::Client
- Inherits:
-
Object
- Object
- Casper::Client
- Defined in:
- lib/casper-client.rb
Constant Summary collapse
- @@options =
{ :host => 'http://casper.jrs-labs.com:8080', :type => 'pdf' }
Class Method Summary collapse
- .options(options = {}) ⇒ Object
- .pdf(options = {}) ⇒ Object
- .report(options = {}) ⇒ Object
- .xls(options = {}) ⇒ Object
Class Method Details
.options(options = {}) ⇒ Object
34 35 36 |
# File 'lib/casper-client.rb', line 34 def self. ={} @@options.merge!() end |
.pdf(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/casper-client.rb', line 14 def self.pdf ={} [:type] = 'pdf' self.report end |
.report(options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/casper-client.rb', line 24 def self.report ={} = @@options.merge!() Client.build do |report| report.template = [:template] report.xml = [:xml] report.xpath = [:xpath] report.type = [:type] end end |
.xls(options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/casper-client.rb', line 19 def self.xls ={} [:type] = 'xls' self.report end |