Class: GitWand::GitHub::Resource::Branch
- Inherits:
-
Object
- Object
- GitWand::GitHub::Resource::Branch
- Defined in:
- lib/git_wand/github/resource/branch.rb
Instance Attribute Summary collapse
-
#commit ⇒ Object
Returns the value of attribute commit.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#commit ⇒ Object
Returns the value of attribute commit.
5 6 7 |
# File 'lib/git_wand/github/resource/branch.rb', line 5 def commit @commit end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/git_wand/github/resource/branch.rb', line 5 def name @name end |
Class Method Details
.build_from_api_result(result) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/git_wand/github/resource/branch.rb', line 7 def self.build_from_api_result(result) return unless result.success? resource = new resource.name = result.body["name"] resource.commit = result.body["commit"] resource end |