Class: CompactIndex::Dependency

Inherits:
Struct
  • Object
show all
Defined in:
lib/compact_index/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#checksumObject

Returns the value of attribute checksum

Returns:

  • (Object)

    the current value of checksum



3
4
5
# File 'lib/compact_index/dependency.rb', line 3

def checksum
  @checksum
end

#gemObject

Returns the value of attribute gem

Returns:

  • (Object)

    the current value of gem



3
4
5
# File 'lib/compact_index/dependency.rb', line 3

def gem
  @gem
end

#platformObject

Returns the value of attribute platform

Returns:

  • (Object)

    the current value of platform



3
4
5
# File 'lib/compact_index/dependency.rb', line 3

def platform
  @platform
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



3
4
5
# File 'lib/compact_index/dependency.rb', line 3

def version
  @version
end

Instance Method Details

#version_and_platformObject



4
5
6
7
8
9
10
# File 'lib/compact_index/dependency.rb', line 4

def version_and_platform
  if platform.nil? || platform == "ruby"
    version.dup
  else
    "#{version}-#{platform}"
  end
end