Sha256: 07a26fb964df932997d0224dbd5b44888acfa9b9d3ea654fdde1c7cea14363b4
Contents?: true
Size: 410 Bytes
Versions: 1
Compression:
Stored size: 410 Bytes
Contents
module Luruju module DynamicMethod class IsNotMyRole < StandardError end def method_missing(method, *args) method_name = method.to_s methods.select{|m|/^dyna_.*/ =~ m.to_s}.sort.each { |dyna_method| begin return send(dyna_method, method, *args) rescue IsNotMyRole end } super end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
luruju-0.0.1 | lib/luruju/dynamic_method.rb |