Module: ObserverPathnameExtension

Extended by:
Context
Defined in:
extend/pathname.rb,
extend/pathname.rbi

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Context

current, current=, debug?, quiet?, verbose?, with_context

Class Attribute Details

.dInteger

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.

Returns:

  • (Integer)


525
526
527
# File 'extend/pathname.rb', line 525

def d
  @d
end

.nInteger

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.

Returns:

  • (Integer)


525
526
527
# File 'extend/pathname.rb', line 525

def n
  @n
end

Class Method Details

.countsArray(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.

Returns:

  • (Array(Integer, Integer))


539
540
541
# File 'extend/pathname.rb', line 539

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.



528
529
530
531
# File 'extend/pathname.rb', line 528

def reset_counts!
  @n = @d = 0
  @put_verbose_trimmed_warning = false
end

.totalInteger

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.

Returns:

  • (Integer)


534
535
536
# File 'extend/pathname.rb', line 534

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.

Returns:

  • (Boolean)


547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'extend/pathname.rb', line 547

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_infovoid

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.



591
592
593
594
# File 'extend/pathname.rb', line 591

def install_info
  super
  puts "info #{self}" if ObserverPathnameExtension.verbose?
end

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.

Parameters:



584
585
586
587
588
# File 'extend/pathname.rb', line 584

def make_relative_symlink(src)
  super
  puts "ln -s #{src.relative_path_from(dirname)} #{basename}" if ObserverPathnameExtension.verbose?
  ObserverPathnameExtension.n += 1
end

#mkpathvoid

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.



571
572
573
574
# File 'extend/pathname.rb', line 571

def mkpath
  super
  puts "mkdir -p #{self}" if ObserverPathnameExtension.verbose?
end

#rmdirvoid

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.



577
578
579
580
581
# File 'extend/pathname.rb', line 577

def rmdir
  super
  puts "rmdir #{self}" if ObserverPathnameExtension.verbose?
  ObserverPathnameExtension.d += 1
end

#uninstall_infovoid

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.



597
598
599
600
# File 'extend/pathname.rb', line 597

def uninstall_info
  super
  puts "uninfo #{self}" if ObserverPathnameExtension.verbose?
end

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.



564
565
566
567
568
# File 'extend/pathname.rb', line 564

def unlink
  super
  puts "rm #{self}" if ObserverPathnameExtension.verbose?
  ObserverPathnameExtension.n += 1
end