summaryrefslogtreecommitdiff
path: root/lib/github/representation/milestone.rb
blob: 5ea54eb178fb1fc71e6d1bc01660672d745faa71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module Github
  module Representation
    class Milestone < Representation::Base
      def iid
        raw['number']
      end

      def title
        raw['title']
      end

      def description
        raw['description']
      end

      def due_date
        raw['due_on']
      end

      def state
        raw['state'] == 'closed' ? 'closed' : 'active'
      end

      def url
        raw['url']
      end

      def created_at
        raw['created_at']
      end

      def updated_at
        raw['updated_at']
      end
    end
  end
end