Class: Streak::Stage

Inherits:
StreakObject show all
Defined in:
lib/streak/stage.rb

Class Method Summary collapse

Methods inherited from StreakObject

attributes, construct_from, convert_to_streak_object, #initialize, #method_missing, relations

Constructor Details

This class inherits a constructor from Streak::StreakObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Streak::StreakObject

Class Method Details

.all(pipeline_key) ⇒ Object



3
4
5
6
# File 'lib/streak/stage.rb', line 3

def self.all(pipeline_key)
  res = Streak.request(:get, "/pipelines/#{pipeline_key}/stages")
  convert_to_streak_object(res, Stage)
end

.create(pipeline_key, params) ⇒ Object



13
14
15
16
# File 'lib/streak/stage.rb', line 13

def self.create(pipeline_key, params)
  res = Streak.request(:put, "/pipelines/#{pipeline_key}/stages", params)
  convert_to_streak_object(res, Stage)
end

.find(pipeline_key, stage_key) ⇒ Object



8
9
10
11
# File 'lib/streak/stage.rb', line 8

def self.find(pipeline_key, stage_key)
  res = Streak.request(:get, "/pipelines/#{pipeline_key}/stages/#{stage_key}")
  convert_to_streak_object(res, Stage)
end