Class: Terret::Composition::Bundle

Inherits:
Data
  • Object
show all
Defined in:
lib/terret/composition.rb

Overview

A gem's config/bundle.yml, parsed. requires is this implementation's answer to §2's "it has to make that code available": Bundler puts the dependency on the load path, and these are the files that pull it in before a row's constant has to resolve.

error is set instead of raising when discovery cannot parse the file: one third-party gem shipping a broken bundle must not break every profile on the machine, only the profiles that name it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



89
90
91
# File 'lib/terret/composition.rb', line 89

def error
  @error
end

#gem_nameObject (readonly)

Returns the value of attribute gem_name

Returns:

  • (Object)

    the current value of gem_name



89
90
91
# File 'lib/terret/composition.rb', line 89

def gem_name
  @gem_name
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



89
90
91
# File 'lib/terret/composition.rb', line 89

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



89
90
91
# File 'lib/terret/composition.rb', line 89

def path
  @path
end

#requiresObject (readonly)

Returns the value of attribute requires

Returns:

  • (Object)

    the current value of requires



89
90
91
# File 'lib/terret/composition.rb', line 89

def requires
  @requires
end

#rowsObject (readonly)

Returns the value of attribute rows

Returns:

  • (Object)

    the current value of rows



89
90
91
# File 'lib/terret/composition.rb', line 89

def rows
  @rows
end

Class Method Details

.broken(gem_name:, path:, error:) ⇒ Object



90
91
92
# File 'lib/terret/composition.rb', line 90

def self.broken(gem_name:, path:, error:)
  new(name: gem_name, gem_name: gem_name, path: path, requires: [], rows: [], error: error)
end