Class: GitObjectBrowser::Models::IndexReucExtension
- Defined in:
- lib/git-object-browser/models/index_reuc_extension.rb
Instance Attribute Summary collapse
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#total_length ⇒ Object
readonly
Returns the value of attribute total_length.
Instance Method Summary collapse
-
#initialize(input) ⇒ IndexReucExtension
constructor
A new instance of IndexReucExtension.
- #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) ⇒ IndexReucExtension
Returns a new instance of IndexReucExtension.
9 10 11 |
# File 'lib/git-object-browser/models/index_reuc_extension.rb', line 9 def initialize(input) super(input) end |
Instance Attribute Details
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
7 8 9 |
# File 'lib/git-object-browser/models/index_reuc_extension.rb', line 7 def signature @signature end |
#total_length ⇒ Object (readonly)
Returns the value of attribute total_length.
7 8 9 |
# File 'lib/git-object-browser/models/index_reuc_extension.rb', line 7 def total_length @total_length end |
Instance Method Details
#parse ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/git-object-browser/models/index_reuc_extension.rb', line 13 def parse @signature = raw(4) # REUC @total_length = int data = raw(@total_length) # TODO self end |
#to_hash ⇒ Object
22 23 24 25 26 27 |
# File 'lib/git-object-browser/models/index_reuc_extension.rb', line 22 def to_hash return { :signature => @signature, :total_length => @total_length, } end |