Class: Octopi::Blob
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#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.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#size ⇒ Object
Returns the value of attribute size.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from Base
Class Method Summary collapse
Methods included from Resource
Methods inherited from Base
#error=, #initialize, #property, #save
Constructor Details
This class inherits a constructor from Octopi::Base
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def data @data end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def mime_type @mime_type end |
#mode ⇒ Object
Returns the value of attribute mode.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def mode @mode end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def name @name end |
#sha ⇒ Object
Returns the value of attribute sha.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def sha @sha end |
#size ⇒ Object
Returns the value of attribute size.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def size @size end |
#text ⇒ Object
Returns the value of attribute text.
4 5 6 |
# File 'lib/octopi/blob.rb', line 4 def text @text end |
Class Method Details
.find(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/octopi/blob.rb', line 10 def self.find(={}) ensure_hash() user, repo = gather_details() sha = [:sha] path = [:path] self.validate_args(sha => :sha, user => :user) if path super [user, repo, sha, path] else Api.api.get_raw(path_for(:resource), {:id => [user, repo, sha].join('/')}) end end |