Module: Conjur::Exists

Included in:
Host, Resource, Role, Secret, Variable
Defined in:
lib/conjur/exists.rb

Instance Method Summary collapse

Instance Method Details

#exists?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
7
8
9
10
# File 'lib/conjur/exists.rb', line 3

def exists?(options = {})
  begin
    self.head(options)
    true
  rescue RestClient::ResourceNotFound
    false
  end
end