# -*- coding: utf-8 -*- module Yaks module Util extend self extend Forwardable def_delegators Inflection, :singular, :singularize, :pluralize def underscore(str) str.gsub(/::/, '/') .gsub(/(? 0 context.instance_eval(&maybe_proc) else # In case it's a lambda with zero arity instance_eval fails context.instance_exec(&maybe_proc) end else maybe_proc.() end else maybe_proc end end end end