Module: DependencyWiring::Wiring

Included in:
MountPoint, SCM
Defined in:
lib/dependency_wiring/wiring.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#destObject

Returns the value of attribute dest.



5
6
7
# File 'lib/dependency_wiring/wiring.rb', line 5

def dest
  @dest
end

#srcObject

Returns the value of attribute src.



5
6
7
# File 'lib/dependency_wiring/wiring.rb', line 5

def src
  @src
end

Instance Method Details

#initialize(src, dest) ⇒ Object



6
7
8
9
# File 'lib/dependency_wiring/wiring.rb', line 6

def initialize(src, dest)
  @src = src
  @dest = dest
end

#prepare_destObject



15
16
17
# File 'lib/dependency_wiring/wiring.rb', line 15

def prepare_dest
  FileUtils.mkdir_p(@dest)
end

#to_sObject



11
12
13
# File 'lib/dependency_wiring/wiring.rb', line 11

def to_s
  "#{src} -> #{dest}"
end

#wireObject



19
20
21
# File 'lib/dependency_wiring/wiring.rb', line 19

def wire
  prepare_dest
end