Base
# File lib/compass/commands/print_version.rb, line 45 def description(command) "Print out version information" end
# File lib/compass/commands/print_version.rb, line 53 def long_output_string lines = [] lines << "Compass #{::Compass.version[:string]}" if name = ::Compass.version[:name] lines.last << " (#{name})" end lines << "Copyright (c) 2008-#{Time.now.year} Chris Eppstein" lines << "Released under the MIT License." lines << "Compass is charityware." lines << "Please make a tax deductable donation for a worthy cause: http://umdf.org/compass" lines.join("\n") end
# File lib/compass/commands/print_version.rb, line 69 def initialize(working_path, options) self.options = options end
# File lib/compass/commands/print_version.rb, line 38 def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(VersionOptionsParser) end
# File lib/compass/commands/print_version.rb, line 73 def execute if options[:custom] version = "" version << "#{Compass.version[:major]}" if options[:major] version << ".#{Compass.version[:minor]}" if options[:minor] version << ".#{Compass.version[:patch]}" if options[:patch] puts version elsif options[:quiet] puts ::Compass.version[:string] else puts self.class.long_output_string end end
Generated with the Darkfish Rdoc Generator 2.