Sha256: d93774688bea41a5e12cb9f9fc76abe43072416d1f50a8973c0f30445797f920

Contents?: true

Size: 431 Bytes

Versions: 7

Compression:

Stored size: 431 Bytes

Contents

module HaveAPI::Fs::Components
  class DeleteActionDir < ActionDir
    help_file :action_dir

    def exec
      ret = super
      
      if ret.is_a?(HaveAPI::Client::Response) && ret.ok?
        if @resource.is_a?(HaveAPI::Client::ResourceInstance)
          id = @resource.id

        else
          id = @resource.prepared_args.last
        end

        context[:resource_dir].delete(id)
      end

      ret
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
haveapi-fs-0.11.0 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.10.0 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.9.0 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.8.0 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.7.1 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.7.0 lib/haveapi/fs/components/delete_action_dir.rb
haveapi-fs-0.1.0 lib/haveapi/fs/components/delete_action_dir.rb