Sha256: fb5720c93458f8b073575cb8ae0194aa73294781a91036320d31b139551b3f89
Contents?: true
Size: 449 Bytes
Versions: 36
Compression:
Stored size: 449 Bytes
Contents
module Capistrano module ProcHelpers module_function # Tests whether the given object appears to respond to `call` with # zero parameters. In Capistrano, such a proc is used to represent a # "deferred value". That is, a value that is resolved by invoking `call` at # the time it is first needed. def callable_without_parameters?(x) x.respond_to?(:call) && (!x.respond_to?(:arity) || x.arity.zero?) end end end
Version data entries
36 entries across 36 versions & 2 rubygems