Class: GitObjectBrowser::Models::IndexEntry
- Defined in:
- lib/git-object-browser/models/index_entry.rb
Instance Attribute Summary collapse
-
#assume_valid_flag ⇒ Object
readonly
Returns the value of attribute assume_valid_flag.
-
#cnano ⇒ Object
readonly
Returns the value of attribute cnano.
-
#ctime ⇒ Object
readonly
Returns the value of attribute ctime.
-
#dev ⇒ Object
readonly
Returns the value of attribute dev.
-
#extended_flag ⇒ Object
readonly
Returns the value of attribute extended_flag.
-
#gid ⇒ Object
readonly
Returns the value of attribute gid.
-
#ino ⇒ Object
readonly
Returns the value of attribute ino.
-
#intent_to_add ⇒ Object
readonly
Returns the value of attribute intent_to_add.
-
#mnano ⇒ Object
readonly
Returns the value of attribute mnano.
-
#mtime ⇒ Object
readonly
Returns the value of attribute mtime.
-
#name_length ⇒ Object
readonly
Returns the value of attribute name_length.
-
#object_type ⇒ Object
readonly
Returns the value of attribute object_type.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#sha1 ⇒ Object
readonly
Returns the value of attribute sha1.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#skip_worktree ⇒ Object
readonly
Returns the value of attribute skip_worktree.
-
#stage ⇒ Object
readonly
Returns the value of attribute stage.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
-
#unix_permission ⇒ Object
readonly
Returns the value of attribute unix_permission.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(input, version, last_path = nil) ⇒ IndexEntry
constructor
A new instance of IndexEntry.
- #parse ⇒ Object
- #to_hash ⇒ Object
Methods inherited from Bindata
#binstr, #byte, #bytes, #find_char, #hex, #int, #peek, #raw, #seek, #skip, #switch_source
Constructor Details
#initialize(input, version, last_path = nil) ⇒ IndexEntry
Returns a new instance of IndexEntry.
14 15 16 17 18 19 |
# File 'lib/git-object-browser/models/index_entry.rb', line 14 def initialize(input, version, last_path = nil) super(input) @version = version @last_path = last_path parse end |
Instance Attribute Details
#assume_valid_flag ⇒ Object (readonly)
Returns the value of attribute assume_valid_flag.
10 11 12 |
# File 'lib/git-object-browser/models/index_entry.rb', line 10 def assume_valid_flag @assume_valid_flag end |
#cnano ⇒ Object (readonly)
Returns the value of attribute cnano.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def cnano @cnano end |
#ctime ⇒ Object (readonly)
Returns the value of attribute ctime.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def ctime @ctime end |
#dev ⇒ Object (readonly)
Returns the value of attribute dev.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def dev @dev end |
#extended_flag ⇒ Object (readonly)
Returns the value of attribute extended_flag.
10 11 12 |
# File 'lib/git-object-browser/models/index_entry.rb', line 10 def extended_flag @extended_flag end |
#gid ⇒ Object (readonly)
Returns the value of attribute gid.
9 10 11 |
# File 'lib/git-object-browser/models/index_entry.rb', line 9 def gid @gid end |
#ino ⇒ Object (readonly)
Returns the value of attribute ino.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def ino @ino end |
#intent_to_add ⇒ Object (readonly)
Returns the value of attribute intent_to_add.
11 12 13 |
# File 'lib/git-object-browser/models/index_entry.rb', line 11 def intent_to_add @intent_to_add end |
#mnano ⇒ Object (readonly)
Returns the value of attribute mnano.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def mnano @mnano end |
#mtime ⇒ Object (readonly)
Returns the value of attribute mtime.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def mtime @mtime end |
#name_length ⇒ Object (readonly)
Returns the value of attribute name_length.
12 13 14 |
# File 'lib/git-object-browser/models/index_entry.rb', line 12 def name_length @name_length end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
8 9 10 |
# File 'lib/git-object-browser/models/index_entry.rb', line 8 def object_type @object_type end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/git-object-browser/models/index_entry.rb', line 9 def path @path end |
#sha1 ⇒ Object (readonly)
Returns the value of attribute sha1.
9 10 11 |
# File 'lib/git-object-browser/models/index_entry.rb', line 9 def sha1 @sha1 end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
9 10 11 |
# File 'lib/git-object-browser/models/index_entry.rb', line 9 def size @size end |
#skip_worktree ⇒ Object (readonly)
Returns the value of attribute skip_worktree.
11 12 13 |
# File 'lib/git-object-browser/models/index_entry.rb', line 11 def skip_worktree @skip_worktree end |
#stage ⇒ Object (readonly)
Returns the value of attribute stage.
10 11 12 |
# File 'lib/git-object-browser/models/index_entry.rb', line 10 def stage @stage end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
9 10 11 |
# File 'lib/git-object-browser/models/index_entry.rb', line 9 def uid @uid end |
#unix_permission ⇒ Object (readonly)
Returns the value of attribute unix_permission.
8 9 10 |
# File 'lib/git-object-browser/models/index_entry.rb', line 8 def @unix_permission end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/git-object-browser/models/index_entry.rb', line 7 def version @version end |
Instance Method Details
#parse ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/git-object-browser/models/index_entry.rb', line 21 def parse @ctime = int # 4 @cnano = int # 8 @mtime = int # 12 @mnano = int # 16 @dev = int # 20 @ino = int # 24 parse_mode # 28 @uid = int # 32 @gid = int # 36 @size = int # 40 @sha1 = hex(20) # 60 parse_flags # 62 (+2) parse_path end |
#to_hash ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/git-object-browser/models/index_entry.rb', line 103 def to_hash return { :ctime => @ctime, :cnano => @cnano, :mtime => @mtime, :mnano => @mnano, :dev => @dev, :ino => @ino, :object_type => @object_type, :unix_permission => @unix_permission, :uid => @uid, :gid => @gid, :size => @size, :sha1 => @sha1, :path => @path, :assume_valid_flag => @assume_valid_flag, :extended_flag => @extended_flag, :stage => @stage, :skip_worktree => @skip_worktree, :intent_to_add => @intent_to_add, :name_length => @name_length, } end |