Class: Casper::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/casper-client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#templateObject

Returns the value of attribute template.



29
30
31
# File 'lib/casper-client.rb', line 29

def template
  @template
end

#xmlObject

Returns the value of attribute xml.



29
30
31
# File 'lib/casper-client.rb', line 29

def xml
  @xml
end

#xpathObject

Returns the value of attribute xpath.



29
30
31
# File 'lib/casper-client.rb', line 29

def xpath
  @xpath
end

Instance Method Details

#to_jsonObject



31
32
33
34
35
36
37
38
39
# File 'lib/casper-client.rb', line 31

def to_json
  {:casper =>
        {
          :jrxml => Base64.encode64(self.template.read),
          :data => Base64.encode64((self.xml.kind_of? File) ? self.xml.read : xml),
          :xpath => self.xpath
        }
  }.to_json
end