Class: Tinybucket::Model::Branch
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#attributes, #attributes=, concern_included?, #initialize
Instance Attribute Details
#links ⇒ Hash
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tinybucket/model/branch.rb', line 20
class Branch < Base
include Tinybucket::Model::Concerns::RepositoryKeys
acceptable_attributes :links, :type, :name, :repository, :target
def commits(options = {})
commits_resource.branch(name, options)
end
private
def commits_resource(options = {})
Tinybucket::Resource::Commits.new(self, options)
end
def branches_api
create_api('Branches', repo_keys)
end
def load_model
branches_api.find(name, {})
end
end
|
#name ⇒ String
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tinybucket/model/branch.rb', line 20
class Branch < Base
include Tinybucket::Model::Concerns::RepositoryKeys
acceptable_attributes :links, :type, :name, :repository, :target
def commits(options = {})
commits_resource.branch(name, options)
end
private
def commits_resource(options = {})
Tinybucket::Resource::Commits.new(self, options)
end
def branches_api
create_api('Branches', repo_keys)
end
def load_model
branches_api.find(name, {})
end
end
|
#repository ⇒ Hash
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tinybucket/model/branch.rb', line 20
class Branch < Base
include Tinybucket::Model::Concerns::RepositoryKeys
acceptable_attributes :links, :type, :name, :repository, :target
def commits(options = {})
commits_resource.branch(name, options)
end
private
def commits_resource(options = {})
Tinybucket::Resource::Commits.new(self, options)
end
def branches_api
create_api('Branches', repo_keys)
end
def load_model
branches_api.find(name, {})
end
end
|
#target ⇒ Hash
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tinybucket/model/branch.rb', line 20
class Branch < Base
include Tinybucket::Model::Concerns::RepositoryKeys
acceptable_attributes :links, :type, :name, :repository, :target
def commits(options = {})
commits_resource.branch(name, options)
end
private
def commits_resource(options = {})
Tinybucket::Resource::Commits.new(self, options)
end
def branches_api
create_api('Branches', repo_keys)
end
def load_model
branches_api.find(name, {})
end
end
|
#type ⇒ String
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tinybucket/model/branch.rb', line 20
class Branch < Base
include Tinybucket::Model::Concerns::RepositoryKeys
acceptable_attributes :links, :type, :name, :repository, :target
def commits(options = {})
commits_resource.branch(name, options)
end
private
def commits_resource(options = {})
Tinybucket::Resource::Commits.new(self, options)
end
def branches_api
create_api('Branches', repo_keys)
end
def load_model
branches_api.find(name, {})
end
end
|
Instance Method Details
Returns the commits available for the specific branch
29
30
31
|
# File 'lib/tinybucket/model/branch.rb', line 29
def commits(options = {})
commits_resource.branch(name, options)
end
|