Class Module
In: lib/facet/macro.rb
Parent: Object

Description

A macro construction for creating dynamic mixins.

Example

  module Mixin
    macro { |options| %{
      def hello
        puts 'Hello from #{options[:name]}'
      end
    } }
  end

  class MyClass
    include Mixin, :name => 'tml'
  end

  m = MyClass.new
  m.hello -> 'Hello from tml'

Author(s)

  • George Moschovitis <gm@navel.gr>
  • Thomas Sawyer

Methods

External Aliases

include -> include_without_macros
extend -> extend_without_macros

Public Instance methods

Note: Is this the best name for this callback?

Note: Is this the best name for this callback?

[Validate]