Class: Files::Release
- Inherits:
-
Object
- Object
- Files::Release
- Defined in:
- lib/files.com/models/release.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.get_latest(params = {}, options = {}) ⇒ Object
Parameters: platform - string.
Instance Method Summary collapse
-
#description ⇒ Object
string - Native release description.
-
#initialize(attributes = {}, options = {}) ⇒ Release
constructor
A new instance of Release.
-
#native_release_packages ⇒ Object
array - A list of native release packages.
-
#title ⇒ Object
string - Native release title.
-
#version ⇒ Object
string - Native release version.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Release
Returns a new instance of Release.
7 8 9 10 |
# File 'lib/files.com/models/release.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/release.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/release.rb', line 5 def @options end |
Class Method Details
.get_latest(params = {}, options = {}) ⇒ Object
Parameters:
platform - string
34 35 36 37 38 39 |
# File 'lib/files.com/models/release.rb', line 34 def self.get_latest(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: platform must be an String") if params.dig(:platform) and !params.dig(:platform).is_a?(String) response, = Api.send_request("/releases/latest", :get, params, ) Release.new(response.data, ) end |
Instance Method Details
#description ⇒ Object
string - Native release description
13 14 15 |
# File 'lib/files.com/models/release.rb', line 13 def description @attributes[:description] end |
#native_release_packages ⇒ Object
array - A list of native release packages
18 19 20 |
# File 'lib/files.com/models/release.rb', line 18 def native_release_packages @attributes[:native_release_packages] end |
#title ⇒ Object
string - Native release title
23 24 25 |
# File 'lib/files.com/models/release.rb', line 23 def title @attributes[:title] end |
#version ⇒ Object
string - Native release version
28 29 30 |
# File 'lib/files.com/models/release.rb', line 28 def version @attributes[:version] end |