Sha256: 35e4d454281ff5a78749f48645fbe2bb17a74a29d53ad45537123c3a42331bcc

Contents?: true

Size: 468 Bytes

Versions: 15

Compression:

Stored size: 468 Bytes

Contents

require 'itamae'

module Itamae
  class Notification < Struct.new(:runner, :defined_in_resource, :action, :target_resource_desc, :timing)
    def resource
      runner.children.find_resource_by_description(target_resource_desc)
    end

    def run(options)
      action_resource.run(action, options)
    end

    def action_resource
      resource
    end
  end

  class Subscription < Notification
    def action_resource
      defined_in_resource
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
itamae-1.0.0.beta41 lib/itamae/notification.rb
itamae-1.0.0.beta40 lib/itamae/notification.rb
itamae-1.0.0.beta39 lib/itamae/notification.rb
itamae-1.0.0.beta38 lib/itamae/notification.rb
itamae-1.0.0.beta37 lib/itamae/notification.rb
itamae-1.0.0.beta36 lib/itamae/notification.rb
itamae-1.0.0.beta35 lib/itamae/notification.rb
itamae-1.0.0.beta34 lib/itamae/notification.rb
itamae-1.0.0.beta33 lib/itamae/notification.rb
itamae-1.0.0.beta32 lib/itamae/notification.rb
itamae-1.0.0.beta31 lib/itamae/notification.rb
itamae-1.0.0.beta30 lib/itamae/notification.rb
itamae-1.0.0.beta29 lib/itamae/notification.rb
itamae-1.0.0.beta28 lib/itamae/notification.rb
itamae-1.0.0.beta27 lib/itamae/notification.rb