Class: Dawn::Release
- Inherits:
-
Object
- Object
- Dawn::Release
- Includes:
- BaseApi
- Defined in:
- lib/dawn/api/models/release.rb
Overview
:nodoc:
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Release
constructor
A new instance of Release.
- #refresh ⇒ self
Methods included from BaseApi
Methods included from BaseApi::RequestExtension
Methods included from SafeExtension
Constructor Details
#initialize(data) ⇒ Release
Returns a new instance of Release.
23 24 25 26 |
# File 'lib/dawn/api/models/release.rb', line 23 def initialize(data) @app = nil @data = data end |
Instance Attribute Details
Class Method Details
.all(options = {}) ⇒ Array<Dawn::Release>
50 51 52 53 54 55 |
# File 'lib/dawn/api/models/release.rb', line 50 def self.all(={}) get( path: "/releases", query: ).map { |hsh| new hsh["release"] } end |
.find(options = {}) ⇒ Dawn::Release
61 62 63 64 65 66 67 68 |
# File 'lib/dawn/api/models/release.rb', line 61 def self.find(={}) id = id_param() new get( path: "/releases/#{id}", query: )["release"] end |
Instance Method Details
#refresh ⇒ self
38 39 40 41 42 43 44 |
# File 'lib/dawn/api/models/release.rb', line 38 def refresh @data = get( path: "/releases/#{id}", query: )["release"] self end |