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

Version Path
capistrano-3.19.2 lib/capistrano/proc_helpers.rb
capistrano-3.19.1 lib/capistrano/proc_helpers.rb
capistrano-3.19.0 lib/capistrano/proc_helpers.rb
capistrano-3.18.1 lib/capistrano/proc_helpers.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/proc_helpers.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/lib/capistrano/proc_helpers.rb
capistrano-3.18.0 lib/capistrano/proc_helpers.rb
capistrano-3.17.3 lib/capistrano/proc_helpers.rb
capistrano-3.17.2 lib/capistrano/proc_helpers.rb
capistrano-3.17.1 lib/capistrano/proc_helpers.rb
capistrano-3.17.0 lib/capistrano/proc_helpers.rb
capistrano-3.16.0 lib/capistrano/proc_helpers.rb
capistrano-3.15.0 lib/capistrano/proc_helpers.rb
capistrano-3.14.1 lib/capistrano/proc_helpers.rb
capistrano-3.14.0 lib/capistrano/proc_helpers.rb
capistrano-3.13.0 lib/capistrano/proc_helpers.rb
capistrano-3.12.1 lib/capistrano/proc_helpers.rb
capistrano-3.12.0 lib/capistrano/proc_helpers.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/capistrano-3.11.0/lib/capistrano/proc_helpers.rb
capistrano-3.11.2 lib/capistrano/proc_helpers.rb