Class: Octopi::Tree
Constant Summary
Constant Summary
Constants inherited from Base
Instance Attribute Summary (collapse)
-
- (Object) mime_type
Returns the value of attribute mime_type.
-
- (Object) mode
Returns the value of attribute mode.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) repository
Returns the value of attribute repository.
-
- (Object) sha
Returns the value of attribute sha.
-
- (Object) size
Returns the value of attribute size.
-
- (Object) type
Returns the value of attribute type.
-
- (Object) user
Returns the value of attribute user.
Attributes inherited from Base
Class Method Summary (collapse)
Methods inherited from Base
#error=, #initialize, #property, #save
Constructor Details
This class inherits a constructor from Octopi::Base
Instance Attribute Details
- (Object) mime_type
Returns the value of attribute mime_type
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def mime_type @mime_type end |
- (Object) mode
Returns the value of attribute mode
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def mode @mode end |
- (Object) name
Returns the value of attribute name
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def name @name end |
- (Object) repository
Returns the value of attribute repository
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def repository @repository end |
- (Object) sha
Returns the value of attribute sha
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def sha @sha end |
- (Object) size
Returns the value of attribute size
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def size @size end |
- (Object) type
Returns the value of attribute type
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def type @type end |
- (Object) user
Returns the value of attribute user
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def user @user end |
Class Method Details
+ (Object) find(options)
5 6 7 8 9 10 11 12 13 |
# File 'lib/octopi/tree.rb', line 5 def self.find() ensure_hash() user, repo = gather_details() route = "/tree/show/#{user}/#{repo}/#{[:sha]}" trees = Api.api.get(route)["tree"].map do |tree| Tree.new(tree.merge(:user => user, :repository => repo)) end TreeSet.new(trees) end |