Sha256: f596354b292263d07d5e63aec045dc369b218efff0fb7cf95baa4da543c92cb8

Contents?: true

Size: 546 Bytes

Versions: 9

Compression:

Stored size: 546 Bytes

Contents

module Cody::Dsl
  module Schedule
    PROPERTIES = %w[
      Description
      EventPattern
      Name
      RoleArn
      ScheduleExpression
      State
      Targets
    ]
    PROPERTIES.each do |prop|
      define_method(prop.underscore) 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
cody-1.2.1 lib/cody/dsl/schedule.rb
cody-1.1.0 lib/cody/dsl/schedule.rb
cody-1.0.6 lib/cody/dsl/schedule.rb
cody-1.0.5 lib/cody/dsl/schedule.rb
cody-1.0.4 lib/cody/dsl/schedule.rb
cody-1.0.3 lib/cody/dsl/schedule.rb
cody-1.0.2 lib/cody/dsl/schedule.rb
cody-1.0.1 lib/cody/dsl/schedule.rb
cody-1.0.0 lib/cody/dsl/schedule.rb