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



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

def checksum
  @checksum
end

#gemObject

Returns the value of attribute gem

Returns:

  • (Object)

    the current value of gem



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

def gem
  @gem
end

#platformObject

Returns the value of attribute platform

Returns:

  • (Object)

    the current value of platform



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

def platform
  @platform
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



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

def version
  @version
end

Instance Method Details

#version_and_platformObject



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

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