Class Module
In: lib/core_ex.rb
lib/core_ex/module/mix_in_with_args.rb
Parent: Object

Nothing before me !!!

Methods

have   include   make   mixin   setup   teardown   yaml_as  

Included Modules

CoreEx::Module::MixInWithArgs CoreEx::Module::AttrOnce CoreEx::Module::Import CoreEx::Module::InPlace

External Aliases

const_missing -> original_core_ex_const_missing
name -> the_standard_name
yaml_as -> yaml_as_bugged
include -> include_without_setup_call

Public Instance methods

have( aModule, *args )

Alias for mixin

[Source]

# File lib/core_ex/module/mix_in_with_args.rb, line 44
  def include ( *someModules )
    someModules.each do |aModule|
      mixin aModule
    end
  end
make( aModule, *args )

Alias for mixin

[Source]

# File lib/core_ex/module/mix_in_with_args.rb, line 50
  def mixin ( aModule, *args )
    pair = [self, aModule]
    return if mix_in_initialized.include? pair
    call_block(:setup, aModule, *args)
    include_without_setup_call aModule
    extend aModule::ClassMethods if aModule.const_defined? :ClassMethods
    call_block(:teardown, aModule, *args)
    mix_in_initialized << pair
    self
  end

Register the setup block

[Source]

# File lib/core_ex/module/mix_in_with_args.rb, line 17
  def setup ( &block )
    blocks[[:setup, self]] = block unless block.nil?
  end

Register the teardown block

[Source]

# File lib/core_ex/module/mix_in_with_args.rb, line 22
  def teardown ( &block )
    blocks[[:teardown, self]] = block unless block.nil?
  end

[Source]

# File lib/core_ex.rb, line 235
      def yaml_as( tag, sc = true )
        silence_warnings { yaml_as_bugged(tag, sc) }
      end

[Validate]