Sha256: ca9f46437624619ac88dd84fe9b669ba2921ad4905d3f34a31d98827c68d2673

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: redef
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new method for a pre-existing method.
- !ruby/struct:SM::Flow::P 
  body: If <em>aka</em> is given, then the method being redefined will first be aliased to this name.
- !ruby/struct:SM::Flow::VERB 
  body: "  class Greeter\n    def hello ; &quot;Hello&quot; ; end\n  end\n\n  Greeter.new.hello   #=&gt; &quot;Hello&quot;\n\n  class Greeter\n    redefine_method( :hello, :hi ) do\n      hi + &quot;, friend!&quot;\n    end\n  end\n\n  Greeter.new.hello   #=&gt; &quot;Hello, friend!&quot;\n\n CREDIT: Trans\n"
full_name: Module#redefine_method
is_singleton: false
name: redefine_method
params: (sym, aka=nil, &blk)
visibility: private

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-2.4.3 doc/ri/Module/redefine_method-i.yaml