forked from mirrors/org-mode
* lisp/ob-ruby.el: Document all the function arguments
(org-babel-execute:ruby): (org-babel-variable-assignments:ruby): (org-babel-ruby-initiate-session):
This commit is contained in:
parent
fe23bec607
commit
c952ff10fb
|
@ -73,7 +73,7 @@ It's possible to override it by using a header argument `:ruby'")
|
|||
:type 'symbol)
|
||||
|
||||
(defun org-babel-execute:ruby (body params)
|
||||
"Execute a block of Ruby code with Babel.
|
||||
"Execute Ruby BODY according to PARAMS.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((session (org-babel-ruby-initiate-session
|
||||
(cdr (assq :session params)) params))
|
||||
|
@ -127,7 +127,8 @@ This function is called by `org-babel-execute-src-block'."
|
|||
;; helper functions
|
||||
|
||||
(defun org-babel-variable-assignments:ruby (params)
|
||||
"Return list of ruby statements assigning the block's variables."
|
||||
"Return list of ruby statements assigning the block's variables.
|
||||
The assignments are defined in PARAMS."
|
||||
(mapcar
|
||||
(lambda (pair)
|
||||
(format "%s=%s"
|
||||
|
@ -165,7 +166,8 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
(defun org-babel-ruby-initiate-session (&optional session params)
|
||||
"Initiate a ruby session.
|
||||
If there is not a current inferior-process-buffer in SESSION
|
||||
then create one. Return the initialized session."
|
||||
then create one. Return the initialized session.
|
||||
Session settings (`:ruby' header arg value) are taken from PARAMS."
|
||||
(unless (string= session "none")
|
||||
(org-require-package 'inf-ruby)
|
||||
(let* ((command (cdr (or (assq :ruby params)
|
||||
|
|
Loading…
Reference in New Issue