Module: Compass::Commands::VersionOptionsParser

Defined in:
lib/compass/commands/print_version.rb

Instance Method Summary collapse

Instance Method Details

#set_options(opts) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/compass/commands/print_version.rb', line 4

def set_options(opts)
  opts.banner = %Q{Usage: compass version [options]

Options:
}
  opts.on_tail("-?", "-h", "--help", "Print out this message.") do
    puts opts
    exit
  end
  opts.on("-q", "--quiet", "Just print the version string.") do
    self.options[:quiet] = true
  end
  opts.on("--major", "Print the major version number") do
    self.options[:major] = true
    self.options[:custom] = true
  end
  opts.on("--minor", "Print up to the minor version number") do
    self.options[:major] = true
    self.options[:minor] = true
    self.options[:custom] = true
  end
  opts.on("--patch", "Print up to the patch version number") do
    self.options[:major] = true
    self.options[:minor] = true
    self.options[:patch] = true
    self.options[:custom] = true
  end
end