Class: Gemchain::GemInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/gemchain/workspace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, version:, path:, dependencies: {}) ⇒ GemInfo

Returns a new instance of GemInfo.



7
8
9
10
11
12
# File 'lib/gemchain/workspace.rb', line 7

def initialize(name:, version:, path:, dependencies: {})
  @name = name
  @version_string = version
  @path = path
  @dependency_map = dependencies
end

Instance Attribute Details

#dependency_mapObject (readonly)

Returns the value of attribute dependency_map.



5
6
7
# File 'lib/gemchain/workspace.rb', line 5

def dependency_map
  @dependency_map
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/gemchain/workspace.rb', line 5

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/gemchain/workspace.rb', line 5

def path
  @path
end

#version_stringObject (readonly)

Returns the value of attribute version_string.



5
6
7
# File 'lib/gemchain/workspace.rb', line 5

def version_string
  @version_string
end

Instance Method Details

#dependenciesObject



18
19
20
# File 'lib/gemchain/workspace.rb', line 18

def dependencies
  @dependency_map
end

#versionObject



14
15
16
# File 'lib/gemchain/workspace.rb', line 14

def version
  Gem::Version.new(@version_string)
end