Class: Octopi::FileObject

Inherits:
Base
  • Object
show all
Includes:
Resource
Defined in:
lib/octopi/file_object.rb

Constant Summary

Constants inherited from Base

Base::VALID

Instance Attribute Summary collapse

Attributes inherited from Base

#api

Class Method Summary collapse

Methods included from Resource

for, included

Methods inherited from Base

#error=, #initialize, #property, #save

Constructor Details

This class inherits a constructor from Octopi::Base

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/octopi/file_object.rb', line 3

def mode
  @mode
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/octopi/file_object.rb', line 3

def name
  @name
end

#shaObject

Returns the value of attribute sha.



3
4
5
# File 'lib/octopi/file_object.rb', line 3

def sha
  @sha
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/octopi/file_object.rb', line 3

def type
  @type
end

Class Method Details

.find(options = {}) ⇒ Object



9
10
11
12
13
14
# File 'lib/octopi/file_object.rb', line 9

def self.find(options={})
  ensure_hash(options)
  user, repo, branch, sha = gather_details(options)
  self.validate_args(sha => :sha, user => :user, repo => :repo)
  super [user, repo, sha] 
end