Class: Homebrew::DevCmd::FormulaCmd

Inherits:
AbstractCommand show all
Defined in:
dev-cmd/formula.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



19
20
21
22
23
24
25
26
27
# File 'dev-cmd/formula.rb', line 19

def run
  formula_paths = args.named.to_paths(only: :formula).select(&:exist?)
  if formula_paths.blank? && args.named
                                 .to_paths(only: :cask)
                                 .any?(&:exist?)
    odie "Found casks but did not find formulae!"
  end
  formula_paths.each { puts _1 }
end