Class: Targit::Release
Overview
GitHub Release object
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(repo, tag, params = {}) ⇒ Release
constructor
A new instance of Release.
Constructor Details
#initialize(repo, tag, params = {}) ⇒ Release
Returns a new instance of Release.
9 10 11 12 13 14 15 16 |
# File 'lib/targit/release.rb', line 9 def initialize(repo, tag, params = {}) @repo = repo @tag = tag @options = params @options[:client] ||= client @data = create if @options.include?(:create) && data.nil? raise('No release found') if data.nil? end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
7 8 9 |
# File 'lib/targit/release.rb', line 7 def repo @repo end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
7 8 9 |
# File 'lib/targit/release.rb', line 7 def tag @tag end |
Instance Method Details
#data ⇒ Object
18 19 20 |
# File 'lib/targit/release.rb', line 18 def data @data ||= _data end |