Class: GitDB::Objects::Entry
Instance Attribute Summary (collapse)
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) permissions
readonly
Returns the value of attribute permissions.
-
- (Object) sha
readonly
Returns the value of attribute sha.
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Entry) initialize(sha, permissions, name)
constructor
A new instance of Entry.
- - (Object) properties
- - (Object) to_hash
- - (Object) to_json
Methods inherited from Base
Constructor Details
- (Entry) initialize(sha, permissions, name)
A new instance of Entry
7 8 9 10 11 |
# File 'lib/git-db/objects/entry.rb', line 7 def initialize(sha, , name) @sha = sha @permissions = @name = name end |
Instance Attribute Details
- (Object) name (readonly)
Returns the value of attribute name
5 6 7 |
# File 'lib/git-db/objects/entry.rb', line 5 def name @name end |
- (Object) permissions (readonly)
Returns the value of attribute permissions
5 6 7 |
# File 'lib/git-db/objects/entry.rb', line 5 def @permissions end |
- (Object) sha (readonly)
Returns the value of attribute sha
5 6 7 |
# File 'lib/git-db/objects/entry.rb', line 5 def sha @sha end |
Instance Method Details
- (Object) properties
13 14 15 |
# File 'lib/git-db/objects/entry.rb', line 13 def properties [:permissions, :name] end |
- (Object) to_hash
17 18 19 |
# File 'lib/git-db/objects/entry.rb', line 17 def to_hash { :sha => sha, :permissions => , :name => name } end |
- (Object) to_json
21 22 23 |
# File 'lib/git-db/objects/entry.rb', line 21 def to_json to_hash.to_json end |