Class: Jirify::Models::ProjectList
Instance Attribute Summary
Attributes inherited from BaseList
#list
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseList
#each
Methods inherited from Base
client, #method_missing, #respond_to_missing?
Constructor Details
Returns a new instance of ProjectList.
4
5
6
|
# File 'lib/jirify/models/project_list.rb', line 4
def initialize(list)
@list = list.map { |project| Project.new project }
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Jirify::Models::Base
Class Method Details
.all ⇒ Object
21
22
23
|
# File 'lib/jirify/models/project_list.rb', line 21
def all
ProjectList.new client.Project.all
end
|
Instance Method Details
#find_by_name(name) ⇒ Object
8
9
10
|
# File 'lib/jirify/models/project_list.rb', line 8
def find_by_name(name)
find { |project| project.name == name }
end
|
#keys ⇒ Object
12
13
14
|
# File 'lib/jirify/models/project_list.rb', line 12
def keys
map(&:key)
end
|
#names ⇒ Object
16
17
18
|
# File 'lib/jirify/models/project_list.rb', line 16
def names
map(&:name)
end
|