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

Returns a new instance of Dependency.



11
12
13
14
# File 'lib/appraisal/dependency.rb', line 11

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#requirementsObject

Returns the value of attribute requirements.



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

def requirements
  @requirements
end

Instance Method Details

#for_dupObject

:nodoc:



21
22
23
# File 'lib/appraisal/dependency.rb', line 21

def for_dup
  formatted_output Utils.format_arguments(requirements)
end

#to_sObject



16
17
18
# File 'lib/appraisal/dependency.rb', line 16

def to_s
  formatted_output Utils.format_arguments(path_prefixed_requirements)
end