Class: Context::SharedBehavior
- Inherits:
-
Module
- Object
- Module
- Context::SharedBehavior
- Defined in:
- lib/tu-context/shared_behavior.rb
Class Method Summary collapse
-
.create_from_behavior(beh) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#_behavior=(beh) ⇒ Object
:nodoc:.
-
#included(including_module) ⇒ Object
:nodoc:.
Class Method Details
.create_from_behavior(beh) ⇒ Object
:nodoc:
3 4 5 6 7 |
# File 'lib/tu-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:
9 10 11 |
# File 'lib/tu-context/shared_behavior.rb', line 9 def _behavior=(beh) # :nodoc: @_behavior = beh end |
#included(including_module) ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/tu-context/shared_behavior.rb', line 13 def included(including_module) # :nodoc: including_module.class_eval(&@_behavior) end |