Class: BuildkiteGraphqlRuby::ResultsParsers::Job
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- BuildkiteGraphqlRuby::ResultsParsers::Job
- Defined in:
- lib/buildkite_graphql_ruby/results_parsers/job.rb
Class Method Summary collapse
Class Method Details
.from_response(response) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/buildkite_graphql_ruby/results_parsers/job.rb', line 6 def self.from_response(response) node = response['node'] # node.keys: ["agent", "passed", "label", "artifacts", "command", "url"] artifacts = node['artifacts']["edges"].map{|build_response| ResultsParsers::Artifact.from_response(build_response) } new( agent: node['agent'], passed: node['passed'], label: node['label'], command: node['command'], url: node['url'], artifacts: artifacts, ) end |