Class: Issues::Milestone

Inherits:
Object
  • Object
show all
Includes:
Github::Resource, Virtus
Defined in:
lib/issues/milestone.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Github::Resource

included

Class Method Details

.all(repo) ⇒ Object



10
11
12
13
# File 'lib/issues/milestone.rb', line 10

def self.all(repo)
  body = github.get("/repos/#{repo.handle}/milestones").body
  JSON.parse(body).map {|attributes| new(attributes.merge(repo: repo)) }
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/issues/milestone.rb', line 15

def to_s
  "##{number} - #{title} (#{repo.handle})"
end