summaryrefslogtreecommitdiff
path: root/lib/bitbucket/representation
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket/representation')
-rw-r--r--lib/bitbucket/representation/base.rb13
-rw-r--r--lib/bitbucket/representation/user.rb9
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/bitbucket/representation/base.rb b/lib/bitbucket/representation/base.rb
new file mode 100644
index 00000000000..7b639492d38
--- /dev/null
+++ b/lib/bitbucket/representation/base.rb
@@ -0,0 +1,13 @@
+module Bitbucket
+ module Representation
+ class Base
+ def initialize(raw)
+ @raw = raw
+ end
+
+ private
+
+ attr_reader :raw
+ end
+ end
+end
diff --git a/lib/bitbucket/representation/user.rb b/lib/bitbucket/representation/user.rb
new file mode 100644
index 00000000000..ba6b7667b49
--- /dev/null
+++ b/lib/bitbucket/representation/user.rb
@@ -0,0 +1,9 @@
+module Bitbucket
+ module Representation
+ class User < Representation::Base
+ def username
+ raw['username']
+ end
+ end
+ end
+end