class Conjur::DSL2::Executor::Base
Builds a list of execution actions for a statement. The statement is an object from Conjur::DSL2::Types
. Each execution action is an HTTP method, a request path, and request parameters.
Attributes
actions[R]
statement[R]
Public Class Methods
new(statement, actions)
click to toggle source
# File lib/conjur/dsl2/executor/base.rb, line 11 def initialize statement, actions @statement = statement @actions = actions end
Public Instance Methods
action(obj)
click to toggle source
# File lib/conjur/dsl2/executor/base.rb, line 16 def action obj @actions.push obj end
execute()
click to toggle source
# File lib/conjur/dsl2/executor/base.rb, line 20 def execute raise "execute not implemented in #{self.class.name}" end
resource_path(record = nil)
click to toggle source
# File lib/conjur/dsl2/executor/base.rb, line 24 def resource_path record = nil record ||= self.statement [ "authz", record.account, "resources", record.resource_kind, record.id ].join('/') end
role_path(record = nil)
click to toggle source
# File lib/conjur/dsl2/executor/base.rb, line 29 def role_path record = nil record ||= self.statement [ "authz", record.account, "roles", record.role_kind, record.id ].join('/') end