Class: Icons::Sync
- Inherits:
-
Object
- Object
- Icons::Sync
- Defined in:
- lib/icons/sync.rb,
lib/icons/sync/transformations.rb,
lib/icons/sync/process_variants.rb
Defined Under Namespace
Classes: ProcessVariants, Transformations
Instance Method Summary collapse
-
#initialize(name) ⇒ Sync
constructor
A new instance of Sync.
- #now ⇒ Object
Constructor Details
#initialize(name) ⇒ Sync
Returns a new instance of Sync.
8 9 10 11 12 13 14 |
# File 'lib/icons/sync.rb', line 8 def initialize(name) raise "[Icons] Not a valid library" unless Icons.libraries.key?(name.to_sym) @name = name @library = Icons.libraries.fetch(name.to_sym).source @temp_directory = File.join(temp_directory_root, name) end |
Instance Method Details
#now ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/icons/sync.rb', line 16 def now clone_repository process_variants remove_non_svg_files move_library purge_temp_directory rescue => error puts "[Icons] Failed to sync icons: #{error.}" post_error_clean_up raise end |