Class: Conjur::Policy::HTTPExecutor
- Defined in:
- lib/conjur/policy/executor.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #execute(actions) ⇒ Object
-
#initialize(api) ⇒ HTTPExecutor
constructor
A new instance of HTTPExecutor.
Constructor Details
#initialize(api) ⇒ HTTPExecutor
Returns a new instance of HTTPExecutor.
42 43 44 45 |
# File 'lib/conjur/policy/executor.rb', line 42 def initialize api @api = api @context = {} end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
39 40 41 |
# File 'lib/conjur/policy/executor.rb', line 39 def api @api end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
39 40 41 |
# File 'lib/conjur/policy/executor.rb', line 39 def context @context end |
Instance Method Details
#execute(actions) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/conjur/policy/executor.rb', line 47 def execute actions require 'net/https' uri = URI.parse(Conjur.configuration.appliance_url) @base_path = uri.path Net::HTTP.start uri.host, uri.port, use_ssl: true do |http| @http = http actions.each do |step| invoke step end end @context end |