Sha256: 138dc07a8187d8dfe8425bf792c5aa0e5cd3a0e25552ebb3616680ab31662f7d
Contents?: true
Size: 462 Bytes
Versions: 2
Compression:
Stored size: 462 Bytes
Contents
module AdventureRL module Helpers module MethodHelper private def method_exists? method_name return ( methods.include?(method_name) || private_methods.include?(method_name) ) end def method_takes_arguments? method_name return nil unless (method_exists?(method_name)) meth = method method_name return meth.arity.abs > 0 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adventure_rl-0.0.2 | lib/AdventureRL/Helpers/MethodHelper.rb |
adventure_rl-0.0.1.pre.ld42 | lib/AdventureRL/Helpers/MethodHelper.rb |