mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00

(https://github.com/ruby/irb/pull/931)
Some helpers, like Rails console's `app`, requires memoization of the
helper's ivars. To support it IRB needs to memoize helper method instances
as well.
a96c7a6668
16 lines
272 B
Ruby
16 lines
272 B
Ruby
require "singleton"
|
|
|
|
module IRB
|
|
module HelperMethod
|
|
class Base
|
|
include Singleton
|
|
|
|
class << self
|
|
def description(description = nil)
|
|
@description = description if description
|
|
@description
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|