Class: Octopi::IssueSet

Inherits:
Array
  • Object
show all
Includes:
Octopi
Defined in:
lib/octopi/issue_set.rb

Constant Summary

Constant Summary

Constants included from Octopi

VERSION

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Octopi

#authenticated, #authenticated_with

Constructor Details

- (IssueSet) initialize(array)



6
7
8
9
10
# File 'lib/octopi/issue_set.rb', line 6

def initialize(array)
  self.user = array.first.user
  self.repository = array.first.repository
  super(array)
end

Instance Attribute Details

- (Object) repository

Returns the value of attribute repository



4
5
6
# File 'lib/octopi/issue_set.rb', line 4

def repository
  @repository
end

- (Object) user

Returns the value of attribute user



4
5
6
# File 'lib/octopi/issue_set.rb', line 4

def user
  @user
end

Instance Method Details

- (Object) find(number)

Raises:



12
13
14
15
16
# File 'lib/octopi/issue_set.rb', line 12

def find(number)
  issue = detect { |issue| issue.number == number }
  raise NotFound, Issue if issue.nil?
  issue
end

- (Object) search(options = {})



18
19
20
# File 'lib/octopi/issue_set.rb', line 18

def search(options={})
  Issue.search(options.merge(:user => user, :repo => repository))
end