mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
oops, make Pry::WrappedModule#generator private
This commit is contained in:
parent
666ea4aa4c
commit
c8058a1f2d
1 changed files with 12 additions and 12 deletions
|
@ -244,18 +244,6 @@ class Pry
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Ruby 1.8 doesn't support `Enumerator` (it's called Generator instead)
|
|
||||||
#
|
|
||||||
# @return [Object] Return the appropriate generator class.
|
|
||||||
def generator
|
|
||||||
@generator ||= if defined?(Enumerator)
|
|
||||||
Enumerator
|
|
||||||
else
|
|
||||||
require 'generator'
|
|
||||||
Generator
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# @return [Boolean] Whether YARD docs are available for this module.
|
# @return [Boolean] Whether YARD docs are available for this module.
|
||||||
def yard_docs?
|
def yard_docs?
|
||||||
!!(defined?(YARD) && YARD::Registry.at(name))
|
!!(defined?(YARD) && YARD::Registry.at(name))
|
||||||
|
@ -285,6 +273,18 @@ class Pry
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
# Ruby 1.8 doesn't support `Enumerator` (it's called Generator instead)
|
||||||
|
#
|
||||||
|
# @return [Object] Return the appropriate generator class.
|
||||||
|
def generator
|
||||||
|
@generator ||= if defined?(Enumerator)
|
||||||
|
Enumerator
|
||||||
|
else
|
||||||
|
require 'generator'
|
||||||
|
Generator
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# @return [Pry::WrappedModule::Candidate] The candidate of rank 0,
|
# @return [Pry::WrappedModule::Candidate] The candidate of rank 0,
|
||||||
# that is the 'monkey patch' of this module with the highest
|
# that is the 'monkey patch' of this module with the highest
|
||||||
# number of methods. It is considered the 'canonical' definition
|
# number of methods. It is considered the 'canonical' definition
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue