Module: Conjur::Policy::Types::ActsAsCompoundId
Instance Method Summary collapse
Instance Method Details
#==(other) ⇒ Object
99 100 101 |
# File 'lib/conjur/policy/types/records.rb', line 99 def == other other.kind_of?(ActsAsCompoundId) && kind == other.kind && id == other.id && account == other.account end |
#initialize(kind_or_id = nil, id_or_options = nil) ⇒ Object
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/conjur/policy/types/records.rb', line 88 def initialize kind_or_id = nil, = nil if kind_or_id && && .is_a?(String) self.kind = kind_or_id self.id = elsif kind_or_id && kind_or_id.index(":") ||= {} account, self.kind, self.id = kind_or_id.split(':', 3) self.account = account if account != [:default_account] end end |