Class: Tinybucket::Resource::BranchRestrictions
- Defined in:
- lib/tinybucket/resource/branch_restrictions.rb
Instance Method Summary collapse
-
#create(_options) ⇒ Tinybucket::Model::BranchRestriction
Create new BranchRestriction on the repository.
-
#find(restriction_id, options = {}) ⇒ Tinybucket::Model::BranchRestriction
Find the BranchRestriction on the repository.
-
#initialize(repo, options) ⇒ BranchRestrictions
constructor
Constructor.
Constructor Details
#initialize(repo, options) ⇒ BranchRestrictions
Constructor
10 11 12 13 |
# File 'lib/tinybucket/resource/branch_restrictions.rb', line 10 def initialize(repo, ) @repo = repo @args = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base
Instance Method Details
#create(_options) ⇒ Tinybucket::Model::BranchRestriction
Create new BranchRestriction on the repository.
19 20 21 |
# File 'lib/tinybucket/resource/branch_restrictions.rb', line 19 def create() raise NotImplementedError end |
#find(restriction_id, options = {}) ⇒ Tinybucket::Model::BranchRestriction
Find the BranchRestriction on the repository.
28 29 30 31 32 |
# File 'lib/tinybucket/resource/branch_restrictions.rb', line 28 def find(restriction_id, = {}) restrictions_api.find(restriction_id, ).tap do |m| inject_repo_keys(m, @repo.repo_keys) end end |