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