Class: Context::SharedBehavior

Inherits:
Module
  • Object
show all
Defined in:
lib/context/shared_behavior.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_from_behavior(beh) ⇒ Object

:nodoc:



3
4
5
6
7
8
# File 'lib/context/shared_behavior.rb', line 3

def self.create_from_behavior(beh) # :nodoc:
  mod = self.new
  mod._behavior = beh
  
  mod
end

Instance Method Details

#_behavior=(beh) ⇒ Object

:nodoc:



10
11
12
# File 'lib/context/shared_behavior.rb', line 10

def _behavior=(beh) # :nodoc:
  @_behavior = beh
end

#included(arg) ⇒ Object

:nodoc:



14
15
16
# File 'lib/context/shared_behavior.rb', line 14

def included(arg) # :nodoc:
  @_behavior.call
end