Class: Litmus::Report
- Inherits:
-
Base
- Object
- Base
- Litmus::Report
show all
- Defined in:
- lib/litmus/report.rb
Class Method Summary
collapse
Methods inherited from Base
configure, #initialize
Constructor Details
This class inherits a constructor from Litmus::Base
Class Method Details
.create(name) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/litmus/report.rb', line 11
def self.create(name)
builder = Builder::XmlMarkup.new
builder.instruct! :xml, :version=>"1.0"
builder.report do |report|
report.name name if name
end
post('/reports.xml', :body => builder.target!, :headers => {"Content-type" => "application/xml"})["report"]
end
|
.list ⇒ Object
3
4
5
|
# File 'lib/litmus/report.rb', line 3
def self.list
get("/reports.xml")["reports"]
end
|
.show(report_id) ⇒ Object
7
8
9
|
# File 'lib/litmus/report.rb', line 7
def self.show(report_id)
get("/reports/#{report_id}.xml")["report"]
end
|