Method: Cult::CLI::CommandExtensions#block
- Defined in:
- lib/cult/cli/cri_extensions.rb
#block ⇒ Object
This function returns a wrapped version of the block passed to run
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/cult/cli/cri_extensions.rb', line 63 def block lambda do |opts, args, cmd| if project_required? && Cult.project.nil? fail CLIError, "command '#{cmd.name}' requires a Cult project" end check_argument_spec!(args, argument_spec, cmd) if argument_spec super.call(opts, args, cmd) end end |