Class: Neutron::FilePair

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

Overview

File pair

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, target) ⇒ FilePair

Returns a new instance of FilePair.



131
132
133
134
# File 'lib/neutron.rb', line 131

def initialize(source, target)
  @target = target
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



130
131
132
# File 'lib/neutron.rb', line 130

def source
  @source
end

#targetObject (readonly)

Returns the value of attribute target.



130
131
132
# File 'lib/neutron.rb', line 130

def target
  @target
end

Instance Method Details

#expandObject



135
136
137
138
139
# File 'lib/neutron.rb', line 135

def expand
  @target = File.expand_path(@target)
  @source = File.expand_path(@source)
  self
end