Module: Combineable

Defined in:
lib/combineable.rb

Overview

This program is free software: you can redistribute it and/or modify

it under the terms of the Affero GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

(c) 2010 by Hannes Georg

Defined Under Namespace

Modules: IncludeInvader Classes: Combination

Instance Method Summary collapse

Instance Method Details

#combined_with(*modules, &block) ⇒ Object



21
22
23
24
# File 'lib/combineable.rb', line 21

def combined_with(*modules,&block)
  @module_combinations ||= []
  @module_combinations << Combination.new(modules,block)
end

#included(base) ⇒ Object



26
27
28
29
# File 'lib/combineable.rb', line 26

def included(base,*)
  super
  self.__combined(base)
end