Class: Octopi::Tree
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#name ⇒ Object
Returns the value of attribute name.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
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
#mime_type ⇒ Object
Returns the value of attribute mime_type.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def mime_type @mime_type end |
#mode ⇒ Object
Returns the value of attribute mode.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def mode @mode end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def name @name end |
#repository ⇒ Object
Returns the value of attribute repository.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def repository @repository end |
#sha ⇒ Object
Returns the value of attribute sha.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def sha @sha end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def size @size end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/octopi/tree.rb', line 3 def user @user end |
Class Method Details
.find(options) ⇒ Object
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 |