Class: Casper::Client
- Inherits:
-
Object
- Object
- Casper::Client
- Defined in:
- lib/casper-client.rb
Constant Summary collapse
- DEFAULT_HOST =
'http://casper.jrs-labs.com:8080'
Class Method Summary collapse
Class Method Details
.build(options = {}, &block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/casper-client.rb', line 11 def self.build(={}, &block) = {:host => DEFAULT_HOST}.merge!() report = Report.new report.instance_eval(&block) RestClient.post [:host], report.to_json, :content_type => :json, :accept => :json end |