Class: Targit::Release

Inherits:
Object
  • Object
show all
Includes:
Client
Defined in:
lib/targit/release.rb

Overview

GitHub Release object

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/targit/release.rb', line 7

def repo
  @repo
end

#tagObject (readonly)

Returns the value of attribute tag.



7
8
9
# File 'lib/targit/release.rb', line 7

def tag
  @tag
end

Instance Method Details

#dataObject



18
19
20
# File 'lib/targit/release.rb', line 18

def data
  @data ||= _data
end