Class: Streak::Pipeline

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

Class Method Summary collapse

Methods inherited from StreakObject

attributes, construct_from, convert_to_streak_object, #initialize, #method_missing

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

.allObject



7
8
9
10
# File 'lib/streak/pipeline.rb', line 7

def self.all
  res = Streak.request(:get, "/pipelines")
  convert_to_streak_object(res, Pipeline)
end

.create(params) ⇒ Object



17
18
19
20
# File 'lib/streak/pipeline.rb', line 17

def self.create(params)
  res = Streak.request(:put, "/pipelines", params)
  convert_to_streak_object(res, Pipeline)
end

.find(key) ⇒ Object



12
13
14
15
# File 'lib/streak/pipeline.rb', line 12

def self.find(key)
  res = Streak.request(:get, "/pipelines/#{key}")
  convert_to_streak_object(res, Pipeline)
end

.relationsObject



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

def self.relations
  { :fields => Streak::Field, :owner => Streak::User, :stages => Streak::Stage }
end

.update(key, params) ⇒ Object



22
23
24
25
# File 'lib/streak/pipeline.rb', line 22

def self.update(key, params)
  res = Streak.request(:post, "/pipelines/#{key}", MultiJson.dump(params))
  convert_to_streak_object(res, Pipeline)
end