Class: Streak::Box
- Inherits:
-
StreakObject
- Object
- StreakObject
- Streak::Box
- Defined in:
- lib/streak/box.rb
Class Method Summary collapse
- .all(pipeline_key = nil, params = {}) ⇒ Object
- .create(pipeline_key, params = {}) ⇒ Object
- .find(key) ⇒ Object
- .update(key, params) ⇒ Object
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 = nil, params = {}) ⇒ Object
3 4 5 6 7 |
# File 'lib/streak/box.rb', line 3 def self.all(pipeline_key=nil, params={}) path = pipeline_key ? "/pipelines/#{pipeline_key}/boxes" : "/boxes" res = Streak.request(:get, path, params) convert_to_streak_object(res, Box) end |
.create(pipeline_key, params = {}) ⇒ Object
14 15 16 17 |
# File 'lib/streak/box.rb', line 14 def self.create(pipeline_key, params={}) res = Streak.request(:put, "/pipelines/#{pipeline_key}/boxes", params) convert_to_streak_object(res, Box) end |