Class: Caveats

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
Library/Homebrew/caveats.rb,
Library/Homebrew/extend/os/mac/caveats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(f) ⇒ Caveats

Returns a new instance of Caveats



9
10
11
# File 'Library/Homebrew/caveats.rb', line 9

def initialize(f)
  @f = f
end

Instance Attribute Details

#fObject (readonly)

Returns the value of attribute f



7
8
9
# File 'Library/Homebrew/caveats.rb', line 7

def f
  @f
end

Instance Method Details

#caveatsObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'Library/Homebrew/caveats.rb', line 13

def caveats
  caveats = []
  begin
    build = f.build
    f.build = Tab.for_formula(f)
    s = f.caveats.to_s
    caveats << s.chomp + "\n" unless s.empty?
  ensure
    f.build = build
  end
  caveats << keg_only_text
  caveats << function_completion_caveats(:bash)
  caveats << function_completion_caveats(:zsh)
  caveats << function_completion_caveats(:fish)
  caveats << plist_caveats
  caveats << python_caveats
  caveats << elisp_caveats
  caveats.compact.join("\n")
end

#plist_caveatsObject



169
# File 'Library/Homebrew/caveats.rb', line 169

def plist_caveats; end