Sha256: 92686257128e860a9d7a51bdbb4f4af4b010b6c2b970035a4b33e32a29c41247

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

require 'pushpop'

module Pushpop

  class File < Step

    PLUGIN_NAME = 'file'

    Pushpop::Job.register_plugin(PLUGIN_NAME, self)

    def run(last_response=nil, step_responses=nil)

      self.configure(last_response, step_responses)

      ::File.read(@path).split("\n")

    end

    def path(str)
      @path = str
    end

    def configure(last_response=nil, step_responses=nil)
      self.instance_exec(last_response, step_responses, &block)
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pushpop-file-0.1.0 lib/pushpop-file.rb