Class: Thinner::CommandLine
- Inherits:
-
Object
- Object
- Thinner::CommandLine
- Defined in:
- lib/thinner/command_line.rb
Constant Summary
- BANNER =
Usage and summary
"Thinner purges varnish caches as slowly as you need it to.\n\nDocumentation: http://propublica.github.com/thinner/\n\nUsage: thinner OPTIONS URL\n\nOptions:\n"
Instance Method Summary (collapse)
-
- (CommandLine) initialize
constructor
Create a Thinner::CommandLine, parse any associated options, grab a list of urls and start the process.
-
- (Object) run!
Build a Thinner::Configuration instance from the passed in options and go to the races.
Constructor Details
- (CommandLine) initialize
Create a Thinner::CommandLine, parse any associated options, grab a list of urls and start the process
21 22 23 24 25 26 |
# File 'lib/thinner/command_line.rb', line 21 def initialize @urls = [] @urls ||= ARGV run! end |
Instance Method Details
- (Object) run!
Build a Thinner::Configuration instance from the passed in options and go to the races.
30 31 32 33 34 35 36 37 |
# File 'lib/thinner/command_line.rb', line 30 def run! Thinner.configure do |config| .each_pair do |key, value| config.send("#{key}=".to_sym, value) end end Thinner.purge! @urls end |