Module: ObserverPathnameExtension
- Extended by:
- Context
- Defined in:
- extend/pathname.rb,
extend/pathname.rbi
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.
510 511 512 |
# File 'extend/pathname.rb', line 510 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.
510 511 512 |
# File 'extend/pathname.rb', line 510 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.
524 525 526 |
# File 'extend/pathname.rb', line 524 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.
513 514 515 516 |
# File 'extend/pathname.rb', line 513 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.
519 520 521 |
# File 'extend/pathname.rb', line 519 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.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'extend/pathname.rb', line 532 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.
576 577 578 579 |
# File 'extend/pathname.rb', line 576 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.
569 570 571 572 573 |
# File 'extend/pathname.rb', line 569 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.
556 557 558 559 |
# File 'extend/pathname.rb', line 556 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.
562 563 564 565 566 |
# File 'extend/pathname.rb', line 562 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.
582 583 584 585 |
# File 'extend/pathname.rb', line 582 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.
549 550 551 552 553 |
# File 'extend/pathname.rb', line 549 def unlink super puts "rm #{self}" if ObserverPathnameExtension.verbose? ObserverPathnameExtension.n += 1 end |