Module: Mmmm
- Defined in:
- lib/mmmm/src_loc.rb,
lib/mmmm/version.rb,
lib/mmmm/helper.rb
Defined Under Namespace
Classes: FileLineMethod
Constant Summary collapse
- VERSION =
"0.1.2"- Top =
self- Helper =
Proc.new do |obj, method = nil| Mmmm[obj, method] end
Class Method Summary collapse
Class Method Details
.[](obj, method = nil) ⇒ Object
14 15 16 17 18 |
# File 'lib/mmmm/src_loc.rb', line 14 def [](obj, method = nil) return src_loc obj, method if method all_src_loc obj nil end |
.helper(name) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/mmmm/helper.rb', line 11 def helper name if Mmmm::Top.respond_to? name or Mmmm::Top.private_methods.include? name raise NameError,"#{name} is already defined. Please use Mmmm.helper(:another_name)" return end define_helper_method name end |