Class: RubyGemsRequirementsSystem::SystemRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems-requirements-system/system-repository.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, properties) ⇒ SystemRepository

Returns a new instance of SystemRepository.



21
22
23
24
# File 'lib/rubygems-requirements-system/system-repository.rb', line 21

def initialize(id, properties)
  @id = id
  @properties = properties
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



18
19
20
# File 'lib/rubygems-requirements-system/system-repository.rb', line 18

def id
  @id
end

Instance Method Details

#==(other) ⇒ Object



26
27
28
29
30
# File 'lib/rubygems-requirements-system/system-repository.rb', line 26

def ==(other)
  other.is_a?(self.class) and
    @id == other.id and
    @properties == other.properties
end

#[](key) ⇒ Object



40
41
42
# File 'lib/rubygems-requirements-system/system-repository.rb', line 40

def [](key)
  @properties[key]
end

#each(&block) ⇒ Object



44
45
46
# File 'lib/rubygems-requirements-system/system-repository.rb', line 44

def each(&block)
  @properties.each(&block)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/rubygems-requirements-system/system-repository.rb', line 32

def eql?(other)
  self == other
end

#hashObject



36
37
38
# File 'lib/rubygems-requirements-system/system-repository.rb', line 36

def hash
  [@id, @properties].hash
end