Class: Module
Instance Method Summary collapse
Instance Method Details
#my_methods(include_private = true) ⇒ Object
3 4 5 6 7 |
# File 'lib/unextendable/module.rb', line 3 def my_methods(include_private = true) public_instance_methods.tap do |methods| return methods + private_instance_methods + protected_instance_methods if include_private end end |
#unextendable ⇒ Object
9 10 11 |
# File 'lib/unextendable/module.rb', line 9 def unextendable @unextendable = true end |
#unextendable? ⇒ Boolean
13 14 15 |
# File 'lib/unextendable/module.rb', line 13 def unextendable? !!@unextendable end |