Class: Kaya::API::Suite
- Inherits:
-
Object
- Object
- Kaya::API::Suite
- Defined in:
- lib/kaya/API/suite.rb
Class Method Summary collapse
Class Method Details
.info(suite_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kaya/API/suite.rb', line 6 def self.info(suite_id) suite_id = suite_id.to_i if suite_id.respond_to? :to_i response = { "project_name" => Dir.pwd.split("/").last, "suite" => nil, "message" => nil } suite = Kaya::Suites::Suite.get(suite_id) if suite.nil? response["message"] = "Suite not found" else response["suite"] = suite.api_response end response end |
.status(suite_id) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/kaya/API/suite.rb', line 23 def self.status suite_id response = info(suite_id) output = if response["message"] { "suite_id" => nil, "message" => response["message"] } else { "suite_id" => response["suite"]["_id"], "status" => response["suite"]["status"] } end output end |