module AdventureRL::Helpers::MethodHelper

Private Instance Methods

method_exists?(method_name) click to toggle source
# File lib/AdventureRL/Helpers/MethodHelper.rb, line 6
def method_exists? method_name
  return (
    methods.include?(method_name) ||
    private_methods.include?(method_name)
  )
end
method_takes_arguments?(method_name) click to toggle source
# File lib/AdventureRL/Helpers/MethodHelper.rb, line 13
def method_takes_arguments? method_name
  return nil  unless (method_exists?(method_name))
  meth = method method_name
  return meth.arity.abs > 0
end