Parent

Methods

Class Index [+]

Quicksearch

Class

Public Instance Methods

chainable(&blk) click to toggle source

Allows the definition of methods on a class that will be available via super.

Examples

    class Foo
      chainable do
        def hello
          "hello"
        end
      end
    end

    class Foo
      def hello
        super + " Merb!"
      end
    end

Foo.new.hello #=> “hello Merb!“

Parameters

&blk

a block containing method definitions that should be marked as chainable

Returns

Module

The anonymous module that was created

    # File lib/merb-core/core_ext/class.rb, line 29
29:   def chainable(&blk)
30:     mod = Module.new(&blk)
31:     include mod
32:     mod
33:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.