mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-06 22:24:12 -05:00
* crew: Fix .blank? call to proc blocks Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Fix rubocop Signed-off-by: SupeChicken666 <me@supechicken666.dev> --------- Signed-off-by: SupeChicken666 <me@supechicken666.dev>
24 lines
813 B
Ruby
24 lines
813 B
Ruby
module ReportBuildsystemMethods
|
|
def print_buildsystem_methods
|
|
boolean_list = available_boolean_properties
|
|
method_list = methods.reject(&->(m) { boolean_list.include?(m.to_s.delete_suffix('?').to_sym) }).grep(/#{superclass.to_s.downcase}_/).select(&->(i) { send(i) })
|
|
|
|
unless method_list.empty?
|
|
require_gem 'method_source'
|
|
method_blocks = []
|
|
method_strings = []
|
|
method_list.sort.each do |method|
|
|
@method_info = send method
|
|
if @method_info.is_a? String
|
|
method_strings << "#{method}: #{@method_info}".orange
|
|
else
|
|
method_blocks << @method_info.source.to_s.orange
|
|
end
|
|
end
|
|
puts "Additional #{superclass.to_s.capitalize} options being used:".orange
|
|
puts method_strings
|
|
puts method_blocks
|
|
end
|
|
end
|
|
end
|