Class: StreamID

Inherits:
Object
  • Object
show all
Defined in:
lib/ObjectModel/Repository/StreamID.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil) ⇒ StreamID

Returns a new instance of StreamID.



3
4
5
# File 'lib/ObjectModel/Repository/StreamID.rb', line 3

def initialize id = nil
	@sid = id
end

Instance Attribute Details

#sidObject (readonly)

Returns the value of attribute sid.



2
3
4
# File 'lib/ObjectModel/Repository/StreamID.rb', line 2

def sid
  @sid
end

Instance Method Details

#==(other) ⇒ Object



7
8
9
10
# File 'lib/ObjectModel/Repository/StreamID.rb', line 7

def == other
	return false unless other.respond_to? :sid
	@sid == other.sid
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/ObjectModel/Repository/StreamID.rb', line 12

def eql? other
	return false unless self.class == other.class
	@sid == other.sid
end

#hashObject



17
18
19
# File 'lib/ObjectModel/Repository/StreamID.rb', line 17

def hash		
	return @sid.hash
end