Module: MiscHelper
- Defined in:
- lib/ro_core_ext/misc_helper.rb
Class Method Summary collapse
Class Method Details
.get_method_content(constant, name) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ro_core_ext/misc_helper.rb', line 4 def get_method_content(constant, name) unless constant.class == Module or constant.class == Class constant = constant.class end if constant.class == Module or Class src = constant.instance_method(name.to_sym).source.split("\n") src = src - [src.first, src.last] src.join("\n") end end |