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



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

def checksum
  @checksum
end

#gemObject

Returns the value of attribute gem

Returns:

  • (Object)

    the current value of gem



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

def gem
  @gem
end

#platformObject

Returns the value of attribute platform

Returns:

  • (Object)

    the current value of platform



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

def platform
  @platform
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



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

def version
  @version
end

Instance Method Details

#version_and_platformObject



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

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