summaryrefslogtreecommitdiff
path: root/lib/github/representation/milestone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/github/representation/milestone.rb')
-rw-r--r--lib/github/representation/milestone.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/github/representation/milestone.rb b/lib/github/representation/milestone.rb
new file mode 100644
index 00000000000..917e6394ad4
--- /dev/null
+++ b/lib/github/representation/milestone.rb
@@ -0,0 +1,25 @@
+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
+ end
+ end
+end