class Conjur::BaseObject

Attributes

credentials[R]
id[R]

Public Class Methods

new(id, credentials) click to toggle source
# File lib/conjur/base_object.rb, line 26
def initialize id, credentials
  @id = Id.new id
  @credentials = credentials
end

Public Instance Methods

account() click to toggle source
# File lib/conjur/base_object.rb, line 37
def account
  id.account
end
as_json(options={}) click to toggle source
# File lib/conjur/base_object.rb, line 31
def as_json options={}
  {
    id: id.to_s
  }
end
identifier() click to toggle source
# File lib/conjur/base_object.rb, line 45
def identifier
  id.identifier
end
inspect() click to toggle source
# File lib/conjur/base_object.rb, line 53
def inspect
  "<#{self.class.name} id='#{id.to_s}'>"
end
kind() click to toggle source
# File lib/conjur/base_object.rb, line 41
def kind
  id.kind
end
username() click to toggle source
# File lib/conjur/base_object.rb, line 49
def username
  credentials[:username] or raise "No username found in credentials"
end