Class: Dependency::DependencySwapper

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DependencySwapper

Returns a new instance of DependencySwapper.



13
14
15
# File 'lib/dependencyswapper.rb', line 13

def initialize(options)
	@dependency_name = options.fetch(:dependency_name)
end

Instance Attribute Details

#dependency_nameObject (readonly)

Returns the value of attribute dependency_name.



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

def dependency_name
  @dependency_name
end

Class Method Details

.perform(options) ⇒ Object



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

def self.perform(options)
	new(options).perform
end

Instance Method Details

#devObject



23
24
25
26
27
# File 'lib/dependencyswapper.rb', line 23

def dev
	Dependency::DependencyReplacer.new({
		:dependency_name => @dependency_name
	}).dev
end

#runObject



17
18
19
20
21
# File 'lib/dependencyswapper.rb', line 17

def run
	Dependency::DependencyReplacer.new({
		:dependency_name => @dependency_name
	}).run
end