Class: IcePatch2::LargeFileInfo
- Inherits:
-
Object
- Object
- IcePatch2::LargeFileInfo
- Defined in:
- lib/IcePatch2/FileInfo.rb
Instance Attribute Summary collapse
-
#checksum ⇒ Object
Returns the value of attribute checksum.
-
#executable ⇒ Object
Returns the value of attribute executable.
-
#path ⇒ Object
Returns the value of attribute path.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(path = '', checksum = nil, size = 0, executable = false) ⇒ LargeFileInfo
constructor
A new instance of LargeFileInfo.
- #inspect ⇒ Object
Constructor Details
#initialize(path = '', checksum = nil, size = 0, executable = false) ⇒ LargeFileInfo
Returns a new instance of LargeFileInfo.
79 80 81 82 83 84 |
# File 'lib/IcePatch2/FileInfo.rb', line 79 def initialize(path='', checksum=nil, size=0, executable=false) @path = path @checksum = checksum @size = size @executable = executable end |
Instance Attribute Details
#checksum ⇒ Object
Returns the value of attribute checksum.
112 113 114 |
# File 'lib/IcePatch2/FileInfo.rb', line 112 def checksum @checksum end |
#executable ⇒ Object
Returns the value of attribute executable.
112 113 114 |
# File 'lib/IcePatch2/FileInfo.rb', line 112 def executable @executable end |
#path ⇒ Object
Returns the value of attribute path.
112 113 114 |
# File 'lib/IcePatch2/FileInfo.rb', line 112 def path @path end |
#size ⇒ Object
Returns the value of attribute size.
112 113 114 |
# File 'lib/IcePatch2/FileInfo.rb', line 112 def size @size end |
Instance Method Details
#==(other) ⇒ Object
95 96 97 98 99 100 101 102 |
# File 'lib/IcePatch2/FileInfo.rb', line 95 def ==(other) return false if !other.is_a? ::IcePatch2::LargeFileInfo or @path != other.path or @checksum != other.checksum or @size != other.size or @executable != other.executable true end |
#eql?(other) ⇒ Boolean
104 105 106 |
# File 'lib/IcePatch2/FileInfo.rb', line 104 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
86 87 88 89 90 91 92 93 |
# File 'lib/IcePatch2/FileInfo.rb', line 86 def hash _h = 0 _h = 5 * _h + @path.hash _h = 5 * _h + @checksum.hash _h = 5 * _h + @size.hash _h = 5 * _h + @executable.hash _h % 0x7fffffff end |
#inspect ⇒ Object
108 109 110 |
# File 'lib/IcePatch2/FileInfo.rb', line 108 def inspect ::Ice::__stringify(self, T_LargeFileInfo) end |