Sha256: dee68572d35427eeb4eb66ff42a780396e726bd64b3360f30ae6ff600a155e90

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

module Cronjobs
  module DSL
    class Actions

      def initialize(&block)
        @actions = []
        instance_eval(&block)
      end

      def runner(command)
        @actions << "./bin/rails runner '#{command}'"
      end

      def rake(task)
        @actions << "./bin/rake #{task}"
      end

      def to_a
        @actions
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cronjobs-4.0.0.1 lib/cronjobs/dsl/actions.rb
cronjobs-4.0.0.0 lib/cronjobs/dsl/actions.rb
cronjobs-0.1.0 lib/cronjobs/dsl/actions.rb
cronjobs-0.0.1 lib/cronjobs/dsl/actions.rb