Class: Utils::IRB::Shell::MethodWrapper
- Inherits:
-
WrapperBase
- Object
- WrapperBase
- Utils::IRB::Shell::MethodWrapper
- Defined in:
- lib/utils/irb.rb
Instance Attribute Summary collapse
-
#arity ⇒ Object
readonly
Returns the value of attribute arity.
Attributes inherited from WrapperBase
Instance Method Summary collapse
-
#initialize(obj, name, modul) ⇒ MethodWrapper
constructor
A new instance of MethodWrapper.
Methods inherited from WrapperBase
Constructor Details
#initialize(obj, name, modul) ⇒ MethodWrapper
Returns a new instance of MethodWrapper.
138 139 140 141 142 143 144 145 146 |
# File 'lib/utils/irb.rb', line 138 def initialize(obj, name, modul) super(name) if modul @arity = obj.instance_method(name).arity else @arity = obj.method(name).arity end @description = "#@name(#@arity)" end |
Instance Attribute Details
#arity ⇒ Object (readonly)
Returns the value of attribute arity.
148 149 150 |
# File 'lib/utils/irb.rb', line 148 def arity @arity end |