Class: DesignShell::RepoServer
- Inherits:
-
Object
- Object
- DesignShell::RepoServer
- Defined in:
- lib/designshell/repo_server.rb
Constant Summary collapse
- DELEGATE_METHODS =
[:user,:oauth_token,:oauth_secret,:basic_auth,:login,:password,:adapter,:adapter=,:setup]
Instance Method Summary collapse
-
#initialize ⇒ RepoServer
constructor
A new instance of RepoServer.
- #method_missing(sym, *args, &block) ⇒ Object
- #repos ⇒ Object
Constructor Details
#initialize ⇒ RepoServer
Returns a new instance of RepoServer.
8 9 10 |
# File 'lib/designshell/repo_server.rb', line 8 def initialize @bitbucket = BitBucket::Client.new({}) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/designshell/repo_server.rb', line 12 def method_missing(sym, *args, &block) if @bitbucket && DELEGATE_METHODS.include?(sym) @bitbucket.send sym, *args, &block else super end end |
Instance Method Details
#repos ⇒ Object
20 21 22 |
# File 'lib/designshell/repo_server.rb', line 20 def repos @bitbucket.repos.all end |