Module: Conjur::HasId

Included in:
ActsAsAsset, Deputy
Defined in:
lib/conjur/has_id.rb

Overview

Included in classes for assets that derive their id from their urls.

Instance Method Summary collapse

Instance Method Details

#idString

Get this assets id. This is the unqualified Conjur id for the asset, and is derived from the asset's url.

Returns:

  • (String)

    the asset's id



39
40
41
# File 'lib/conjur/has_id.rb', line 39

def id
  URI.unescape self.url.split('/')[-1]
end