Class: TokyoMetro::Rake::Assets::Image::SvgFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/tokyo_metro/rake/assets/image/svg_files.rb

Defined Under Namespace

Classes: EachFile

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSvgFiles

Returns a new instance of SvgFiles.



3
4
5
6
7
# File 'lib/tokyo_metro/rake/assets/image/svg_files.rb', line 3

def initialize
  @svg_dirname = "#{ ::TokyoMetro::DEV_DIR }/app/images/svg"
  @asset_image_dirname = "#{ ::TokyoMetro::RAILS_DIR }/app/assets/images"
  @svg_files = ::Dir.glob( "#{@svg_dirname}/**.svg" )
end

Class Method Details

.copyObject



15
16
17
# File 'lib/tokyo_metro/rake/assets/image/svg_files.rb', line 15

def self.copy
  self.new.copy
end

Instance Method Details

#copyObject



9
10
11
12
13
# File 'lib/tokyo_metro/rake/assets/image/svg_files.rb', line 9

def copy
  @svg_files.sort.each do | filename |
    EachFile.new( @svg_dirname , @asset_image_dirname , filename ).copy
  end
end