| Server IP : 217.160.0.212 / Your IP : 216.73.216.15 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/org/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [require ob org-macs add-to-list org-babel-tangle-lang-exts ("ruby" . "rb")] 3)
(defvar org-babel-default-header-args:ruby nil)
#@113 Name of command to use for executing ruby code.
It's possible to override it by using a header argument `:ruby'
(defvar org-babel-ruby-command "ruby" (#$ . 271))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315&\210\300\316\302\303\317DD\320\306\307\310\311\312\321\314\322&\207" [custom-declare-variable org-babel-ruby-hline-to funcall function #[0 "\300\207" ["nil"] 1 #1=""] "Replace hlines in incoming tables with this when translating to ruby." :group org-babel :version "24.4" :package-version (Org . "8.0") :type string org-babel-ruby-nil-to #[0 "\300\207" [hline] 1 #1#] "Replace nil in ruby tables with this before returning." (Org . "8.0") symbol] 12)
#@118 Execute a block of Ruby code with Babel.
This function is called by `org-babel-execute-src-block'.
(fn BODY PARAMS)
(defalias 'org-babel-execute:ruby #[514 "\301\302\236A\"\303\236A\304\236A\305\236A\206 \306\307!#\310\235\203J \311\312\313\"r\211q\210\314\315\"\216\316\317!\210c\210\320\321\236A!\210\322 *\262\202Q \323$\324\325\235?\205\242 \326\235\204\233 \327\235\204\233 \330\235\204\233 \331\235\204\233 \332\235\204\233 \333\235\204\233 \334\235\204\225 \335\235\204\225 \336\235\204\225 \337\235\203\237 \340\235\204\237 \202\242 \341!\342\343 \236A\344\n\236A\"\342\345\n\236A\346\236A\"#)\207" [org-babel-ruby-command org-babel-ruby-initiate-session :session :result-params :result-type :ruby org-babel-expand-body:generic org-babel-variable-assignments:ruby "xmp" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] require rcodetools xmp :xmp-option buffer-string org-babel-ruby-evaluate org-babel-reassemble-table "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" org-babel-ruby-table-or-string org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 14 (#$ . 964)])
#@93 Prepare SESSION according to the header arguments specified in PARAMS.
(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:ruby #[514 "\301!\302!\303!\204 \304\305\"\210\306 \307\310\"\216rq\210\212\311\312\313!\210db\210\314\307\315\"\"\210,\210\207" [comint-input-filter org-babel-ruby-initiate-session org-babel-variable-assignments:ruby org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] sit-for 0.5 mapc #[257 "\211c\210\301\302\303\"\210\304\300!\210\305\306!\210db\207" [V0 comint-send-input nil t org-babel-comint-wait-for-output sit-for 0.1] 4 "\n\n(fn VAR)"]] 9 (#$ . 2212)])
#@51 Load BODY into SESSION.
(fn SESSION BODY PARAMS)
(defalias 'org-babel-load-session:ruby #[771 "\300 \301\302\"\216\303\"r\211q\210\304\305p!!b\210\306!c\210)\211\262)\207" [current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] org-babel-prep-session:ruby process-mark get-buffer-process org-babel-chomp] 8 (#$ . 2973)])
#@78 Return list of ruby statements assigning the block's variables.
(fn PARAMS)
(defalias 'org-babel-variable-assignments:ruby #[257 "\300\301\302!\"\207" [mapcar #[257 "\300\301@\302A!#\207" [format "%s=%s" org-babel-ruby-var-to-ruby] 6 "\n\n(fn PAIR)"] org-babel--get-vars] 5 (#$ . 3346)])
#@143 Convert VAR into a ruby variable.
Convert an elisp value into a string of ruby source code
specifying a variable of the same value.
(fn VAR)
(defalias 'org-babel-ruby-var-to-ruby #[257 "\211<\203 \301\302\303\304#\305Q\207\211\306=\203 \207\307\310\"\207" [org-babel-ruby-hline-to "[" mapconcat org-babel-ruby-var-to-ruby ", " "]" hline format "%S"] 6 (#$ . 3645)])
#@180 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.
(fn RESULTS)
(defalias 'org-babel-ruby-table-or-string #[257 "\300!\211<\203
\301\302\"\207\207" [org-babel-script-escape mapcar #[257 "\211\204 \207\207" [org-babel-ruby-nil-to] 2 "\n\n(fn EL)"]] 5 (#$ . 4024)])
#@168 Initiate a ruby session.
If there is not a current inferior-process-buffer in SESSION
then create one. Return the initialized session.
(fn &optional SESSION PARAMS)
(defalias 'org-babel-ruby-initiate-session #[512 "\302\230?\205\\ \303\304!\210\305\236\206 \306 \"A\307\310\311\"!\211\206H \312 \313\314\"\216\315\316!\2033 \2024 \206: \317?\205B \320 #\210p)\262\321!\203S \322\323!\210\207\322\324!\210\325!\266\203\207" [inf-ruby-default-implementation inf-ruby-implementations "none" require inf-ruby :ruby assoc get-buffer format "*%s*" current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] run-ruby-or-pop-to-buffer functionp "ruby" inf-ruby-buffer org-babel-comint-buffer-livep sit-for 0.25 0.5 org-babel-ruby-initiate-session] 9 (#$ . 4415)])
#@51 String to indicate that evaluation has completed.
(defvar org-babel-ruby-eoe-indicator ":org_babel_ruby_eoe" (#$ . 5232))
(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")
#@281 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.
(fn BUFFER BODY &optional RESULT-TYPE RESULT-PARAMS)
(defalias 'org-babel-ruby-evaluate #[1026 "\2040 \306\267\202. \307\"\207\310\311!\307\312\313\235\203 \202 \n\314\315\"#\"\210\316!\207\317\207\320\267\202Z\312\321\"\322!\204F \323\324\"\210\325 \326\327\"\216rq\210\212\330\331C\326\332\"
B\317\333\334p!!b\210`d{\262|\266c\210\335\317\336\"\210?b\210\212\337\340!\317\336#\205\216 \337@\317\336#)\204\233 \341\334p!!\210\202y \333\334p!!b\210\211c\210\203\305 \342\343\344\345\340\206\264 \331!#\242\"\203\305 \211\242\346\225\317O\240\210\347\242@\"\210)\266,\210\350\351\352\347\350\353\322!\204\344 \323\324\f\"\210\325 \326\354\"\216rq\210\212\355\331C\326\356\"
B\317\333\334p!!b\210`d{\262|\266\357\360\361\362F\"\210?b\210\212\337\340!\317\336#\2050\337@\317\336#)\204=\341\334p!!\210\202\333\334p!!b\210\211c\210\f\203h\342\343\344\345\340\206W\331!#\242\"\203h\211\242\346\225\317O\240\210\347\242@\")\266\202,\262\344#\363\"\364\"\344#\207\310\311!\365\235\206\211\313\235\322!\204\226\323\324\"\210\325 \326\366\"\216rq\210\212\367\331C\326\370\"
B\317\333\334p!!b\210`d{\262|\266\203\316\371c\210\335\317\336\"\210\357\372\373\nC\204\346\312A\314\315\"\"C\202\363\374\375\376\312B\314\315\"\"FC#\"\210\335\317\336\"\210?b\210\212\337\340!\317\336#\205\337@\317\336#)\204\341\334p!!\210\202\375\333\334p!!b\210\211c\210\203J\342\343\344\345\340\f\2069\331!#\242\"\203J\211\242\346\225\317O\240\210\347\242@\"\210)\266,\210\316!\207\317\207" [org-babel-ruby-command org-babel-ruby-pp-wrapper-method org-babel-ruby-wrapper-method org-babel-ruby-eoe-indicator comint-input-filter comint-output-filter-functions #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 10 value 15)) org-babel-eval org-babel-temp-file "ruby-" format "pp" org-babel-process-file-name noquote org-babel-eval-read-file nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 54 value 381)) "puts \"%s\"" org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] "" #[257 "\300\211\242P\240\207" [V0] 4 "\n\n(fn TEXT)"] process-mark get-buffer-process comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "\n" "[
\n]+" 0 split-string mapconcat identity butlast org-trim #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] #[257 "\300\211\242P\240\207" [V0] 4 "\n\n(fn TEXT)"] mapc #[257 "\300!c\210\301\302\303\"\207" [org-babel-chomp comint-send-input nil t] 4 "\n\n(fn LINE)"] "conf.echo=false;_org_prompt_mode=conf.prompt_mode;conf.prompt_mode=:NULL" "conf.prompt_mode=_org_prompt_mode;conf.echo=true" "[
\n]" 4 "code" #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] #[257 "\300\211\242P\240\207" [V0] 4 "\n\n(fn TEXT)"] "require 'pp';" #[257 "\300!c\210\301\302\303\"\207" [org-babel-chomp comint-send-input nil t] 4 "\n\n(fn LINE)"] append "results=_" "require 'pp'" "orig_out = $stdout" comint-last-input-end comint-prompt-regexp org-babel-ruby-f-write org-babel-ruby-pp-f-write] 21 (#$ . 5910)])
(provide 'ob-ruby)