Sha256: cce5796b85648ebfa2014240bd31216bb29a3dffb21b3a1ef7d8bdef684ec3f7

Contents?: true

Size: 523 Bytes

Versions: 41

Compression:

Stored size: 523 Bytes

Contents

require 'itamae'

module Itamae
  class Notification < Struct.new(: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

    def runner
      defined_in_resource.recipe.runner
    end
  end

  class Subscription < Notification
    def action_resource
      defined_in_resource
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
itamae-1.1.18 lib/itamae/notification.rb
itamae-1.1.17 lib/itamae/notification.rb
itamae-1.1.16 lib/itamae/notification.rb
itamae-1.1.15 lib/itamae/notification.rb
itamae-1.1.14 lib/itamae/notification.rb
itamae-1.1.13 lib/itamae/notification.rb
itamae-1.1.12 lib/itamae/notification.rb
itamae-1.1.11 lib/itamae/notification.rb
itamae-1.1.10 lib/itamae/notification.rb
itamae-1.1.9 lib/itamae/notification.rb
itamae-1.1.8 lib/itamae/notification.rb
itamae-1.1.7 lib/itamae/notification.rb
itamae-1.1.5 lib/itamae/notification.rb
itamae-1.1.4 lib/itamae/notification.rb
itamae-1.1.3 lib/itamae/notification.rb
itamae-1.1.2 lib/itamae/notification.rb
itamae-1.1.1 lib/itamae/notification.rb
itamae-1.1.0 lib/itamae/notification.rb
itamae-1.0.13 lib/itamae/notification.rb
itamae-1.0.12 lib/itamae/notification.rb