;ELC   
;;; Compiled
;;; in Emacs version 24.5.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\302\303\304\"\207" [require ob 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" (#$ . 574))
(byte-code "\300\301\302\303\304\305\306\307\310\311\312\313&\210\300\314\315\316\304\305\306\307\310\317\312\320&\207" [custom-declare-variable org-babel-ruby-hline-to "nil" "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 'hline "Replace nil in ruby tables with this before returning." (Org . "8.0") symbol] 12)
#@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!*r*q\210\320\216\321\322!\210c\210\323\307\324\"A!\210\325 +\202I \326	\n$+\327\n,\330,\235?\205\255 \331,\235\204\244 \332,\235\204\244 \333,\235\204\244 \334,\235\204\244 \335,\235\204\244 \336,\235\204\244 \337,\235\204\235 \340,\235\204\235 \341,\235\204\235 \342,\235\203\251 \343,\235\204\251 +\202\255 \344+!)\345\307\346\"A\307\347\"A\"\345\307\350\"A\307\351\"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 "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 #1# result #2=#:--params] 8 (#$ . 1117)])
#@72 Prepare SESSION according to the header arguments specified in PARAMS.
(defalias 'org-babel-prep-session:ruby #[(session params) "\305!\306	!\307!\204 \310\311\"\210\312 \313\216rq\210\314\315\316!\210db\210\317\320\n\"\210,*\207" [session params var-lines save-match-data-internal 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 ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[(input) "\300\207" [nil] 1] 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 (#$ . 2424)])
#@25 Load BODY into SESSION.
(defalias 'org-babel-load-session:ruby #[(session body params) "\305 \306\216\307	\n\"rq\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 (#$ . 3202)])
#@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@\303A!#\207" [pair format "%s=%s" org-babel-ruby-var-to-ruby] 5] cdr org-babel-get-header :var] 7 (#$ . 3560)])
#@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 \302\303\304\305#\306Q\207\307\232\203 	\207\310\311\"\207" [var org-babel-ruby-hline-to "[" mapconcat org-babel-ruby-var-to-ruby ", " "]" hline format "%S"] 5 (#$ . 3875)])
#@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) "\302!\211<\203 \303\304	\"\202 	)\207" [results res org-babel-script-escape mapcar #[(el) "\302\232\203 	\207\207" [el org-babel-ruby-nil-to nil] 2]] 4 (#$ . 4247)])
#@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 (#$ . 4647)])
#@51 String to indicate that evaluation has completed.
(defvar org-babel-ruby-eoe-indicator ":org_babel_ruby_eoe" (#$ . 5215))
(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) "\2048 \306	\307\"\203 \310\n\"\207\306	\311\"\205\200\312\313!\310\n\314\315\235\203) ?\202+ @\316\f\317\"#\"\210\320\f!)\207\306	\307\"\203\226\314\321A\"B\322!\204Q \323\324\"\210\325 C\326\216rq\210\327D\330E\331FBF\332\211GH\333\334p!!b\210`dI\211JI{GJI|\210*Bc\210\335\332\336\"\210Kb\210\212\337\340A!\332\336#\205\246 \337L\332\336#)\204\263 \341\334p!!\210\202\220 \333\334p!!b\210Gc\210B\203\336 \342\343\344\345\340B\206\316 \330!#E\"\203\336 E\346\225\332OH\347EL\"\210.\350\351\352\347\350\353\322!\204\370 \323\324\"\210\325 C\354\216rq\210\355D\330E\356FBF\332\211GH\333\334p!!b\210`dI\211JI{GJI|\210*\357\360\361\362BF\"\210Kb\210\212\337\340A!\332\336#\205N\337L\332\336#)\204[\341\334p!!\210\2028\333\334p!!b\210Gc\210\203\204\342\343\344\345\340\206t\330!#E\"\203\204E\346\225\332OH\347EL\".\344#\363\"\364\"\344#)\207\306	\311\"\205\200\312\313!\365\235\206\252\315\235M\322!\204\267\323\324\"\210\325 C\366\216rq\210\367D\330E\370FBF\332\211GH\333\334p!!b\210`dI\211JI{GJI|\210*M\203\372\371c\210\335\332\336\"\210\357\372\373CM\204\314N\316\f\317\"\"C\202\374\375\376\314O\316\f\317\"\"FAC#\"\210\335\332\336\"\210Kb\210\212\337\340A!\332\336#\205=\337L\332\336#)\204J\341\334p!!\210\202'\333\334p!!b\210Gc\210\203s\342\343\344\345\340\206c\330!#E\"\203sE\346\225\332OH\347EL\"\210.\320\f!*\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 "puts \"%s\"" org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[#1=(input) "\300\207" [nil] 1] "" #[#2=(text) "	P\211\207" [string-buffer text] 2] nil 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-babel-trim ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[#1# "\300\207" [nil] 1] #[#2# "	P\211\207" [string-buffer text] 2] mapc #[(line) "\301!c\210\302\303\304\"\207" [line org-babel-chomp comint-send-input nil t] 3] "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" ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) #[#1# "\300\207" [nil] 1] #[#2# "	P\211\207" [string-buffer text] 2] "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 org-babel-ruby-eoe-indicator eoe-string save-match-data-internal comint-input-filter string-buffer comint-output-filter-functions dangling-text raw end start comint-last-input-end comint-prompt-regexp ppp org-babel-ruby-f-write org-babel-ruby-pp-f-write] 13 (#$ . 5893)])
#@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 (#$ . 9408)])
(provide 'ob-ruby)
