18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/green_onion/cli.rb', line 18
def skin(url)
GreenOnion.configure do |c|
c.skins_dir = options[:dir] if options[:dir]
c.threshold = options[:threshold] if options[:threshold]
c.dimensions = { :width => options[:width], :height => options[:height] } if options[:width] && options[:height]
c.driver = options[:driver].to_sym if options[:driver]
end
case options[:method]
when "v"
GreenOnion.skin_visual(url)
when "p"
GreenOnion.skin_percentage(url)
else
GreenOnion.skin_visual_and_percentage(url)
end
end
|