Sha256: 47817cec5d731568c948b0576950048ff65ea581c79343d1413d6ad09b6f38b6

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: redirect
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redirect methods to other methods. This simply defines methods by the name of a hash key which calls the method with the name of the hash's value.
- !ruby/struct:SM::Flow::VERB 
  body: "  class Example\n    redirect_method :hi => :hello, :hey => :hello\n    def hello(name)\n      puts "Hello, #{name}."\n    end\n  end\n\n  e = Example.new\n  e.hello("Bob")    #=> "Hello, Bob."\n  e.hi("Bob")       #=> "Hello, Bob."\n  e.hey("Bob")      #=> "Hello, Bob."\n"
- !ruby/struct:SM::Flow::P 
  body: "The above class definition is equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class Example\n    def hi(*args)\n      hello(*args)\n    end\n    def hey(*args)\n      hello(*args)\n    end\n    def hello\n      puts "Hello"\n    end\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "CREDIT: Trans"
full_name: Module#redirect_method
is_singleton: false
name: redirect_method
params: ( method_hash )
visibility: private

Version data entries

1 entries across 1 versions & 1 rubygems

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