Class: Modification
- Inherits:
-
Module
- Object
- Module
- Modification
- Defined in:
- lib/modifiers/modification.rb
Instance Method Summary collapse
-
#initialize(name, receiver, method_name, method_body) ⇒ Modification
constructor
A new instance of Modification.
Constructor Details
#initialize(name, receiver, method_name, method_body) ⇒ Modification
Returns a new instance of Modification.
2 3 4 5 6 7 8 |
# File 'lib/modifiers/modification.rb', line 2 def initialize(name, receiver, method_name, method_body) @name, @receiver, @method_name = name, receiver, method_name super() do define_method(method_name, &method_body) set_visibility end end |