Class: CopyImageStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/ralbum/image_strategies/copy_image_strategy.rb

Overview

Copy an image from inpath to outpath

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ CopyImageStrategy

Returns a new instance of CopyImageStrategy.



7
8
9
# File 'lib/ralbum/image_strategies/copy_image_strategy.rb', line 7

def initialize( name )
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/ralbum/image_strategies/copy_image_strategy.rb', line 5

def name
  @name
end

Instance Method Details

#build(inpath, outpath) ⇒ Object



11
12
13
# File 'lib/ralbum/image_strategies/copy_image_strategy.rb', line 11

def build( inpath, outpath )
  FileUtils.cp( inpath, outpath )
end