Module: ObserverPathnameExtension
- Extended by:
- Context, T::Helpers
- Defined in:
- extend/pathname/observer_pathname_extension.rb
Class Attribute Summary collapse
- .d ⇒ Integer private
- .n ⇒ Integer private
Class Method Summary collapse
- .counts ⇒ Array<(Integer, Integer)> private
- .reset_counts! ⇒ void private
- .total ⇒ Integer private
- .verbose? ⇒ Boolean private
Instance Method Summary collapse
- #install_info ⇒ void private
- #make_relative_symlink(src) ⇒ void private
- #mkpath ⇒ void private
- #rmdir ⇒ void private
- #uninstall_info ⇒ void private
- #unlink ⇒ void private
Methods included from Context
current, current=, debug?, quiet?, verbose?, with_context
Class Attribute Details
.d ⇒ Integer
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
15 16 17 |
# File 'extend/pathname/observer_pathname_extension.rb', line 15 def d @d end |
.n ⇒ Integer
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
15 16 17 |
# File 'extend/pathname/observer_pathname_extension.rb', line 15 def n @n end |
Class Method Details
.counts ⇒ Array<(Integer, Integer)>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 |
# File 'extend/pathname/observer_pathname_extension.rb', line 29 def counts [n, d] end |
.reset_counts! ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
18 19 20 21 |
# File 'extend/pathname/observer_pathname_extension.rb', line 18 def reset_counts! @n = @d = 0 @put_verbose_trimmed_warning = false end |
.total ⇒ Integer
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
24 25 26 |
# File 'extend/pathname/observer_pathname_extension.rb', line 24 def total n + d end |
.verbose? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'extend/pathname/observer_pathname_extension.rb', line 37 def verbose? return super unless ENV["CI"] return false unless super if total < MAXIMUM_VERBOSE_OUTPUT true else unless @put_verbose_trimmed_warning puts "Only the first #{MAXIMUM_VERBOSE_OUTPUT} operations were output." @put_verbose_trimmed_warning = true end false end end |
Instance Method Details
#install_info ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
81 82 83 84 |
# File 'extend/pathname/observer_pathname_extension.rb', line 81 def install_info super puts "info #{self}" if ObserverPathnameExtension.verbose? end |
#make_relative_symlink(src) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
74 75 76 77 78 |
# File 'extend/pathname/observer_pathname_extension.rb', line 74 def make_relative_symlink(src) super puts "ln -s #{src.relative_path_from(dirname)} #{basename}" if ObserverPathnameExtension.verbose? ObserverPathnameExtension.n += 1 end |
#mkpath ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
61 62 63 64 |
# File 'extend/pathname/observer_pathname_extension.rb', line 61 def mkpath super puts "mkdir -p #{self}" if ObserverPathnameExtension.verbose? end |
#rmdir ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
67 68 69 70 71 |
# File 'extend/pathname/observer_pathname_extension.rb', line 67 def rmdir super puts "rmdir #{self}" if ObserverPathnameExtension.verbose? ObserverPathnameExtension.d += 1 end |
#uninstall_info ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
87 88 89 90 |
# File 'extend/pathname/observer_pathname_extension.rb', line 87 def uninstall_info super puts "uninfo #{self}" if ObserverPathnameExtension.verbose? end |
#unlink ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
54 55 56 57 58 |
# File 'extend/pathname/observer_pathname_extension.rb', line 54 def unlink super puts "rm #{self}" if ObserverPathnameExtension.verbose? ObserverPathnameExtension.n += 1 end |