summaryrefslogtreecommitdiffstats
path: root/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure')
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/forin5
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/if5
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/ife7
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/tim3
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/until5
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/upt5
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/when5
-rw-r--r--emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/while5
8 files changed, 40 insertions, 0 deletions
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/forin b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/forin
new file mode 100644
index 0000000..197e09e
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/forin
@@ -0,0 +1,5 @@
+#name : for ... in ...; ... end
+# --
+for ${1:element} in ${2:collection}
+ $0
+end
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/if b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/if
new file mode 100644
index 0000000..c96069b
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/if
@@ -0,0 +1,5 @@
+#name : if ... end
+# --
+if ${1:condition}
+ $0
+end
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/ife b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/ife
new file mode 100644
index 0000000..959d77c
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/ife
@@ -0,0 +1,7 @@
+#name : if ... else ... end
+# --
+if ${1:condition}
+ $2
+else
+ $3
+end
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/tim b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/tim
new file mode 100644
index 0000000..44023c0
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/tim
@@ -0,0 +1,3 @@
+#name : times { |n| ... }
+# --
+times { |${n}| $0 }
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/until b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/until
new file mode 100644
index 0000000..b3534a8
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/until
@@ -0,0 +1,5 @@
+#name : until ... end
+# --
+until ${condition}
+ $0
+end
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/upt b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/upt
new file mode 100644
index 0000000..73c0046
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/upt
@@ -0,0 +1,5 @@
+#name : upto(...) { |n| ... }
+# --
+upto(${n}) { |${i}|
+ $0
+}
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/when b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/when
new file mode 100644
index 0000000..51f63a3
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/when
@@ -0,0 +1,5 @@
+#name : when ... end
+# --
+when ${condition}
+ $0
+end
diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/while b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/while
new file mode 100644
index 0000000..00e114f
--- /dev/null
+++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/control structure/while
@@ -0,0 +1,5 @@
+#name : while ... end
+# --
+while ${condition}
+ $0
+end