Sha256: fc4d6cdabc69c25b851ee4f68cf7611a2c43c3768d6286c6976b375e588091e0

Contents?: true

Size: 543 Bytes

Versions: 9

Compression:

Stored size: 543 Bytes

Contents

module Pipedream::Dsl
  module Schedule
    PROPERTIES = %w[
      description
      event_pattern
      name
      role_arn
      schedule_expression
      state
      targets
    ]
    PROPERTIES.each do |prop|
      define_method(prop) do |v|
        @properties[prop.to_sym] = v
      end
    end

    def rate(period)
      @schedule_expression = "rate(#{period})"
    end

    def cron(expression)
      @schedule_expression = "cron(#{expression})"
    end

    def rule_event(props={})
      @rule_event_props = props
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pipedream-0.4.8 lib/pipedream/dsl/schedule.rb
pipedream-0.4.7 lib/pipedream/dsl/schedule.rb
pipedream-0.4.6 lib/pipedream/dsl/schedule.rb
pipedream-0.4.5 lib/pipedream/dsl/schedule.rb
pipedream-0.4.4 lib/pipedream/dsl/schedule.rb
pipedream-0.4.3 lib/pipedream/dsl/schedule.rb
pipedream-0.4.2 lib/pipedream/dsl/schedule.rb
pipedream-0.4.1 lib/pipedream/dsl/schedule.rb
pipedream-0.4.0 lib/pipedream/dsl/schedule.rb