MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/org/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/org/ob-ruby.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:44 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/ob-ruby.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\"\207" [require ob ob-ref ob-comint ob-eval add-to-list org-babel-tangle-lang-exts ("ruby" . "rb")] 3)
(defvar org-babel-default-header-args:ruby nil)
#@49 Name of command to use for executing ruby code.
(defvar org-babel-ruby-command "ruby" (#$ . 782))
#@100 Execute a block of Ruby code with Babel.
This function is called by `org-babel-execute-src-block'.
(defalias 'org-babel-execute:ruby #[(body params) "\306\307\310\"A!\307\311\"A\307\312\"A\313\f\314!#\315\n\235\203C\316\317!rq\210\320\216\321\322!\210
c\210\323\307\324\"A!\210\325 +\202I\326	
\n$\327\330\307\331\"A\307\332\"A\"\330\307\333\"A\307\334\"A\"#-\207" [params session result-params result-type body full-body org-babel-ruby-initiate-session assoc :session :result-params :result-type org-babel-expand-body:generic org-babel-variable-assignments:ruby "xmp" generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) require rcodetools xmp :xmp-option buffer-string org-babel-ruby-evaluate org-babel-reassemble-table org-babel-pick-name :colname-names :colnames :rowname-names :rownames #1# result] 8 (#$ . 887)])
#@72 Prepare SESSION according to the header arguments specified in PARAMS.
(defalias 'org-babel-prep-session:ruby #[(session params) "\304!\305	!\212\306 \307\216\310!\204\311\312\"\210q\210\313\314!\210db\210\315\316\n\"\210+*\207" [session params var-lines save-match-data-internal org-babel-ruby-initiate-session org-babel-variable-assignments:ruby match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" sit-for 0.5 mapc #[(var) "c\210\302\303\304\"\210\305	!\210\306\307!\210db\207" [var session comint-send-input nil t org-babel-comint-wait-for-output sit-for 0.1] 3]] 3 (#$ . 1807)])
#@25 Load BODY into SESSION.
(defalias 'org-babel-load-session:ruby #[(session body params) "\305 \306\216\307	\n\"rq\210\310\311p!!b\210\312\f!c\210)+\207" [#1=#:wconfig session params buffer body current-window-configuration ((set-window-configuration #1#)) org-babel-prep-session:ruby process-mark get-buffer-process org-babel-chomp] 3 (#$ . 2533)])
#@65 Return list of ruby statements assigning the block's variables.
(defalias 'org-babel-variable-assignments:ruby #[(params) "\301\302\301\303\304\305\"\"\"\207" [params mapcar #[(pair) "\301\302@\303A!#\207" [pair format "%s=%s" org-babel-ruby-var-to-ruby] 5] cdr org-babel-get-header :var] 7 (#$ . 2891)])
#@133 Convert VAR into a ruby variable.
Convert an elisp value into a string of ruby source code
specifying a variable of the same value.
(defalias 'org-babel-ruby-var-to-ruby #[(var) "<\203\301\302\303\304#\305Q\207\306\307\"\207" [var "[" mapconcat org-babel-ruby-var-to-ruby ", " "]" format "%S"] 5 (#$ . 3206)])
#@166 Convert RESULTS into an appropriate elisp value.
If RESULTS look like a table, then convert them into an
Emacs-lisp table, otherwise return the results as a string.
(defalias 'org-babel-ruby-table-or-string #[(results) "\301!\207" [results org-babel-script-escape] 2 (#$ . 3528)])
#@137 Initiate a ruby session.
If there is not a current inferior-process-buffer in SESSION
then create one.  Return the initialized session.
(defalias 'org-babel-ruby-initiate-session #[(&optional session params) "\303\230?\205.\304\305!\210\306 \307\216\310\311\"\210p*\312\n!\203&\313\314!\210\n\202-\313\315!\210\316!)\207" [session #1=#:wconfig session-buffer "none" require inf-ruby current-window-configuration ((set-window-configuration #1#)) run-ruby nil org-babel-comint-buffer-livep sit-for 0.25 0.5 org-babel-ruby-initiate-session] 3 (#$ . 3817)])
#@51 String to indicate that evaluation has completed.
(defvar org-babel-ruby-eoe-indicator ":org_babel_ruby_eoe" (#$ . 4385))
(defvar org-babel-ruby-f-write "File.open('%s','w'){|f| f.write((_.class == String) ? _ : _.inspect)}")
(defvar org-babel-ruby-pp-f-write "File.open('%s','w'){|f| $stdout = f; pp(results); $stdout = orig_out}")
(defvar org-babel-ruby-wrapper-method "\ndef main()\n%s\nend\nresults = main()\nFile.open('%s', 'w'){ |f| f.write((results.class == String) ? results : results.inspect) }\n")
(defvar org-babel-ruby-pp-wrapper-method "\nrequire 'pp'\ndef main()\n%s\nend\nresults = main()\nFile.open('%s', 'w') do |f|\n  $stdout = f\n  pp results\nend\n")
#@225 Pass BODY to the Ruby process in BUFFER.
If RESULT-TYPE equals 'output then return a list of the outputs
of the statements in BODY, if RESULT-TYPE equals 'value then
return the value of the last statement in BODY, as elisp.
(defalias 'org-babel-ruby-evaluate #[(buffer body &optional result-type result-params) "\204O\306	\307\"\203\310\n\"\207\306	\311\"\205\312\313!\310\n\314\315
\235\203):\202+;\316\f\317\"#\"\210\320\f!<\321
\235\204D\315
\235\203I<\202M\322<!*\207\306	\307\"\203	\323\324\325\326\323\327\325\212\330 =\331\216\332!\204o\333\334\"\210q\210\335\336\211<>?\337@B@\340\216\341\342p!!b\210`dA\211BA{>BA|\210*\343\344CD\"\210\345\336\346\"\210Db\210\212\347\350C!\336\346#\205\300\347E\336\346#)\204\315\351\342p!!\210\202\252\341\342p!!b\210>c\210)\203\367\352\353\354\355\350\206\347\335!#?\"\203\367?\356\225\336O<\326?E\".\357\"\354#\360\"!\354#\207\306	\311\"\205\312\313!\321
\235\206\315
\235F\212\330 =\361\216\332!\2041\333\334\"\210q\210\335\336\211<>?\362@B@\363\216\341\342p!!b\210`dA\211BA{>BA|\210*F\203l\364c\210\345\336\346\"\210\343\365\366CF\204\202\314G\316\f\317\"\"C\202\216\367\370\371\314H\316\f\317\"\"FCC#\"\210\345\336\346\"\210Db\210\212\347\350C!\336\346#\205\257\347E\336\346#)\204\274\351\342p!!\210\202\231\341\342p!!b\210>c\210)\203\346\352\353\354\355\350\206\326\335!#?\"\203\346?\356\225\336O<\326?E\"\210.\320\f!*I\321
\235\204\315
\235\203I\202\n\322I!)\207" [buffer result-type org-babel-ruby-command body tmp-file result-params eql output org-babel-eval value org-babel-temp-file "ruby-" format "pp" org-babel-process-file-name noquote org-babel-eval-read-file "code" org-babel-ruby-table-or-string mapconcat identity butlast split-string org-babel-trim match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" "" nil #[#1=(text) "	P\211\207" [string-buffer text] 2] ((byte-code "A\301\207" [comint-output-filter-functions nil] 1)) process-mark get-buffer-process mapc #[(line) "\301!c\210\302\303\304\"\207" [line org-babel-chomp comint-send-input nil t] 3] comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "\n" "[
\n]+" 0 2 "[
\n]" ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[#1# "	P\211\207" [string-buffer text] 2] ((byte-code "A\301\207" [comint-output-filter-functions nil] 1)) "require 'pp';" #[(line) "\301!c\210\302\303\304\"\207" [line org-babel-chomp comint-send-input nil t] 3] append "results=_" "require 'pp'" "orig_out = $stdout" org-babel-ruby-pp-wrapper-method org-babel-ruby-wrapper-method raw save-match-data-internal dangling-text string-buffer comint-output-filter-functions end start org-babel-ruby-eoe-indicator comint-last-input-end comint-prompt-regexp ppp org-babel-ruby-f-write org-babel-ruby-pp-f-write results] 14 (#$ . 5063)])
#@38 Strip \"s from around a ruby string.
(defalias 'org-babel-ruby-read-string #[(string) "\301\302\"\203\f\303\304\"\207\207" [string string-match "^\"\\([^]+\\)\"$" match-string 1] 3 (#$ . 8133)])
(provide 'ob-ruby)

MMCT - 2023