1
0
Fork 0
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:
John Mair 2013-01-29 20:54:25 +01:00
parent 666ea4aa4c
commit c8058a1f2d

View file

@ -244,18 +244,6 @@ class Pry
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.
def yard_docs?
!!(defined?(YARD) && YARD::Registry.at(name))
@ -285,6 +273,18 @@ class Pry
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,
# that is the 'monkey patch' of this module with the highest
# number of methods. It is considered the 'canonical' definition