Class: IconGenerator::Thor

Inherits:
Thor
  • Object
show all
Defined in:
lib/icon_generator/thor.rb

Instance Method Summary collapse

Instance Method Details

#favicon(source, destination) ⇒ Object



11
12
13
# File 'lib/icon_generator/thor.rb', line 11

def favicon(source, destination)
    IconGenerator::Builder.new(source, destination).build(:favicon)
end

#generate(destination) ⇒ Object



18
19
20
21
# File 'lib/icon_generator/thor.rb', line 18

def generate(destination)
    favicon(options[:favicon], destination) if options[:favicon]
    touch(options[:touch], destination) if options[:touch]
end

#touch(source, destination) ⇒ Object



5
6
7
8
# File 'lib/icon_generator/thor.rb', line 5

def touch(source, destination)
    builder = IconGenerator::Builder.new(source, destination)
    options[:single] ? builder.build_single() : builder.build(:touch)
end