Class: Test::Unit::Context::Shared::Behavior
- Inherits:
-
Module
- Object
- Module
- Test::Unit::Context::Shared::Behavior
- Defined in:
- lib/test/unit/context/shared.rb
Instance Attribute Summary collapse
-
#shared_name ⇒ Object
readonly
Returns the value of attribute shared_name.
Instance Method Summary collapse
-
#included(klass) ⇒ Object
:nodoc:.
-
#initialize(name, block) ⇒ Behavior
constructor
A new instance of Behavior.
Constructor Details
#initialize(name, block) ⇒ Behavior
Returns a new instance of Behavior.
123 124 125 126 127 |
# File 'lib/test/unit/context/shared.rb', line 123 def initialize(name, block) super() @shared_name = name @_block = block end |
Instance Attribute Details
#shared_name ⇒ Object (readonly)
Returns the value of attribute shared_name.
121 122 123 |
# File 'lib/test/unit/context/shared.rb', line 121 def shared_name @shared_name end |
Instance Method Details
#included(klass) ⇒ Object
:nodoc:
129 130 131 |
# File 'lib/test/unit/context/shared.rb', line 129 def included(klass) # :nodoc: klass.class_eval(&@_block) # @_block.call end |