Sha256: 68c99920638f60c6669e0bf006e10ba6f4f316bcb9400c0005aa696e61518551

Contents?: true

Size: 338 Bytes

Versions: 2

Compression:

Stored size: 338 Bytes

Contents

= Preinitialize

Require the library.

    require 'mixers/preinitialize'

Use example module.

   module M
     def preinitialize
       @a = 23
     end
   end

Define a class to support it.

   class X
     include Preinitializable
     include M
     def a ; @a ; end
   end

The result should be:

   x = X.new
   x.a.assert == 23


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mixers-1.2.0 qed/09_preinitialize.rdoc
mixers-1.1.0 qed/09_preinitialize.rdoc