Class: Context::SharedBehavior
- Inherits:
-
Module
- Object
- Module
- Context::SharedBehavior
- Defined in:
- lib/context/shared_behavior.rb
Class Method Summary collapse
-
.create_from_behavior(beh) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#_behavior=(beh) ⇒ Object
:nodoc:.
-
#included(arg) ⇒ Object
:nodoc:.
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: arg.instance_eval(&@_behavior) end |