Commit 55b0c46

mokha <mokha@cisco.com>
2018-02-14 02:19:42
move hippo to a template.
1 parent b69792c
Changed files (2)
lib
lib/xsay/templates/hippo.template
@@ -0,0 +1,18 @@
+  .-''''-. _
+ ('    '  '0)-/)
+ '..____..:    \\._
+   \\u  u (        '-..------._
+   |     /      :   '.        '--.
+  .nn_nn/ (      :   '            '\\
+ ( '' '' /      ;     .             \\
+  ''----' "\\          :            : '.
+         .'/                           '.
+        / /                             '.
+       /_|       )                     .\\|
+         |      /\\                     . '
+         '--.__|  '--._  ,            /
+                      /'-,          .'
+                     /   |        _.'
+                    (____\\       /
+                          \\      \\
+                           '-'-'-'
lib/xsay.rb
@@ -17,26 +17,7 @@ module Xsay
 
     desc "hippo <message>", "xsay hippo meow"
     def hippo(message)
-      template = <<-MESSAGE
-  .-''''-. _
- ('    '  '0)-/)
- '..____..:    \\._
-   \\u  u (        '-..------._
-   |     /      :   '.        '--.
-  .nn_nn/ (      :   '            '\\
- ( '' '' /      ;     .             \\
-  ''----' "\\          :            : '.
-         .'/                           '.
-        / /                             '.
-       /_|       )                     .\\|
-         |      /\\                     . '
-         '--.__|  '--._  ,            /
-                      /'-,          .'
-                     /   |        _.'
-                    (____\\       /
-                          \\      \\
-                           '-'-'-'
-      MESSAGE
+      template = IO.read(File.expand_path('xsay/templates/hippo.template', File.dirname(__FILE__)))
       render(message, template)
     end