cmd/options.rb: move common code in options.rb
Closes Homebrew/homebrew#47423. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
parent
e224c2fc9e
commit
b7e98b129c
@ -1,6 +1,6 @@
|
||||
require "blacklist"
|
||||
require "caveats"
|
||||
require "cmd/options"
|
||||
require "options"
|
||||
require "formula"
|
||||
require "keg"
|
||||
require "tab"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
require "formula"
|
||||
require "options"
|
||||
|
||||
module Homebrew
|
||||
def options
|
||||
@ -24,12 +25,4 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def dump_options_for_formula(f)
|
||||
f.options.sort_by(&:flag).each do |opt|
|
||||
puts "#{opt.flag}\n\t#{opt.description}"
|
||||
end
|
||||
puts "--devel\n\tInstall development version #{f.devel.version}" if f.devel
|
||||
puts "--HEAD\n\tInstall HEAD version" if f.head
|
||||
end
|
||||
end
|
||||
|
||||
@ -112,3 +112,13 @@ class Options
|
||||
"#<#{self.class.name}: #{to_a.inspect}>"
|
||||
end
|
||||
end
|
||||
|
||||
module Homebrew
|
||||
def dump_options_for_formula(f)
|
||||
f.options.sort_by(&:flag).each do |opt|
|
||||
puts "#{opt.flag}\n\t#{opt.description}"
|
||||
end
|
||||
puts "--devel\n\tInstall development version #{f.devel.version}" if f.devel
|
||||
puts "--HEAD\n\tInstall HEAD version" if f.head
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user