Class: Indexer::Conflict
- Defined in:
- lib/indexer/components/conflict.rb
Overview
The Conflict class models the name and versions of packages that have know incompatibilities.
Instance Attribute Summary collapse
-
#name ⇒ Object
The name of the package that causes the conflict.
-
#version ⇒ Object
The versions constraint of the conflicting package.
Class Method Summary collapse
-
.parse(data) ⇒ Object
Parse ‘data` into a Dependency instance.
Methods inherited from Model
#[], #[]=, attr_reader, attr_writer, #initialize, #initialize_attributes, #key?, #merge!, #method_missing, #to_h, #to_yaml
Constructor Details
This class inherits a constructor from Indexer::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Indexer::Model
Instance Attribute Details
#name ⇒ Object
The name of the package that causes the conflict.
Yea it’s ALWAYS THEIR fault ;-)
53 54 55 |
# File 'lib/indexer/components/conflict.rb', line 53 def name @name end |
#version ⇒ Object
The versions constraint of the conflicting package. This is used when only certain versions of the package are the problem.
67 68 69 |
# File 'lib/indexer/components/conflict.rb', line 67 def version @version end |
Class Method Details
.parse(data) ⇒ Object
Parse ‘data` into a Dependency instance.
TODO: What about respond_to?(:to_str) for String, etc.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/indexer/components/conflict.rb', line 11 def self.parse(data) case data when String parse_string(data) when Array parse_array(data) when Hash parse_hash(data) else raise(ValidationError, "Conflict") end end |