Class: ElmInstall::Dependency

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/elm_install/dependency.rb

Overview

Represents a dependency

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, source, constraints) ⇒ Dependency

Initializes a new dependency.

Parameters:

  • constraints (Array<Solve::Constraint>)

    The contraints

  • source (Source)

    The source

  • name (String)

    The name



30
31
32
33
34
35
# File 'lib/elm_install/dependency.rb', line 30

def initialize(name, source, constraints)
  @constraints = constraints
  @source = source
  @name = name
  self
end

Instance Attribute Details

#constraintsArray (readonly)

Returns The constraints for the dependency.

Returns:

  • (Array)

    The constraints for the dependency



7
8
9
# File 'lib/elm_install/dependency.rb', line 7

def constraints
  @constraints
end

#nameString (readonly)

Returns The name of the dependency.

Returns:

  • (String)

    The name of the dependency



20
21
22
# File 'lib/elm_install/dependency.rb', line 20

def name
  @name
end

#sourceSource (readonly)

Returns The source to use for resolving (Git, Directory).

Returns:

  • (Source)

    The source to use for resolving (Git, Directory)



17
18
19
# File 'lib/elm_install/dependency.rb', line 17

def source
  @source
end

#versionSemverse::Version #version=(value) ⇒ Object

Overloads:



14
15
16
# File 'lib/elm_install/dependency.rb', line 14

def version
  @version
end