Class: Appraisal::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/appraisal/dependency.rb

Overview

Dependency on a gem and optional version requirements

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, requirements) ⇒ Dependency


9
10
11
12
# File 'lib/appraisal/dependency.rb', line 9

def initialize(name, requirements)
  @name = name
  @requirements = requirements
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


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

def name
  @name
end

#requirementsObject

Returns the value of attribute requirements


6
7
8
# File 'lib/appraisal/dependency.rb', line 6

def requirements
  @requirements
end

Instance Method Details

#for_dupObject

:nodoc:


19
20
21
# File 'lib/appraisal/dependency.rb', line 19

def for_dup
  formatted_output Utils.format_arguments(requirements)
end

#to_sObject


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

def to_s
  formatted_output Utils.format_arguments(path_prefixed_requirements)
end