Class: FackUp::Image::File
- Inherits:
-
Struct
- Object
- Struct
- FackUp::Image::File
- Defined in:
- lib/fackup/image.rb
Instance Attribute Summary collapse
-
#gid ⇒ Object
Returns the value of attribute gid.
-
#io ⇒ Object
Returns the value of attribute io.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#start ⇒ Object
Returns the value of attribute start.
-
#time ⇒ Object
Returns the value of attribute time.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
Instance Attribute Details
#gid ⇒ Object
Returns the value of attribute gid
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def gid @gid end |
#io ⇒ Object
Returns the value of attribute io
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def io @io end |
#mode ⇒ Object
Returns the value of attribute mode
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def mode @mode end |
#name ⇒ Object
Returns the value of attribute name
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def name @name end |
#size ⇒ Object
Returns the value of attribute size
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def size @size end |
#start ⇒ Object
Returns the value of attribute start
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def start @start end |
#time ⇒ Object
Returns the value of attribute time
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def time @time end |
#uid ⇒ Object
Returns the value of attribute uid
22 23 24 |
# File 'lib/fackup/image.rb', line 22 def uid @uid end |
Instance Method Details
#content ⇒ Object
27 28 29 30 |
# File 'lib/fackup/image.rb', line 27 def content io.seek(start) io.read(size) end |
#pack ⇒ Object
23 24 25 |
# File 'lib/fackup/image.rb', line 23 def pack "%s\0%s" % [name, [time.to_i, start, size, uid, gid, mode].pack(PACK_TEMPLATE)] end |