Sha256: 18011f06a184ea44fde91fdd7ca9eb2399dbaf86658ded788e8d37eec7749c51

Contents?: true

Size: 599 Bytes

Versions: 1

Compression:

Stored size: 599 Bytes

Contents

require 'tap/task'

module Tap
  module Tasks
    # :startdoc::task provides a handle to ARGV
    #
    # Simply returns ARGV.  This task can be a useful hook when executing
    # saved workflows via run (given that all arguments after the workflow
    # file are preserved in ARGV).
    #
    #   # [workflow.yml]
    #   # - - argv
    #   # - - dump/yaml
    #   # - 0[1]
    #
    #   % tap run -w workflow.yml a b c
    #   ---
    #   - a
    #   - b
    #   - c
    #   
    class Argv < Tap::Task
      
      # Simply returns ARGV.
      def process
        ARGV
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tap-tasks-0.2.0 lib/tap/tasks/argv.rb