Module: DuckPuncher::Ducks::Method
- Defined in:
- lib/duck_puncher/ducks/method.rb
Defined Under Namespace
Classes: Definition
Instance Method Summary collapse
Instance Method Details
#to_instruct ⇒ Object
4 5 6 7 |
# File 'lib/duck_puncher/ducks/method.rb', line 4 def to_instruct definition = Definition.new(self) RubyVM::InstructionSequence.new(definition.lines.join).disasm if definition.lines.any? end |
#to_source ⇒ Object
9 10 11 |
# File 'lib/duck_puncher/ducks/method.rb', line 9 def to_source Definition.new(self).to_s end |