Module: SfCli::Sf::Apex::Run
- Included in:
- Core
- Defined in:
- lib/sf_cli/sf/apex/run.rb
Defined Under Namespace
Classes: ApexResult
Instance Method Summary collapse
-
#run(target_org: nil, file: nil, api_version: nil) ⇒ ApexResult
Run apex code and returns its result.
Instance Method Details
#run(target_org: nil, file: nil, api_version: nil) ⇒ ApexResult
Run apex code and returns its result. If you don’t specify the script file, it starts interactive mode.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/sf_cli/sf/apex/run.rb', line 56 def run(target_org: nil, file: nil, api_version: nil) _file = crate_tmpfile(file) path = _file&.path || file flags = {:"target-org" => target_org, :"file" => path, :"api-version" => api_version} json = exec(__method__, flags: flags, redirection: :null_stderr) ApexResult.new(json['result']) ensure _file&.close! end |