Class: Phash::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/phash.rb

Direct Known Subclasses

HashData

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, length = nil) ⇒ Data

Returns a new instance of Data.



6
7
8
9
# File 'lib/phash.rb', line 6

def initialize(data, length = nil)
  @data = data
  @length = length if length
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/phash.rb', line 5

def data
  @data
end

#lengthObject (readonly)

Returns the value of attribute length.



5
6
7
# File 'lib/phash.rb', line 5

def length
  @length
end