aboutsummaryrefslogtreecommitdiff
path: root/source/_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'source/_helpers.rb')
-rw-r--r--source/_helpers.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/_helpers.rb b/source/_helpers.rb
index 4f7dbf6c..f957d2a6 100644
--- a/source/_helpers.rb
+++ b/source/_helpers.rb
@@ -156,6 +156,15 @@ module Helpers
# My added helpers
+ def show_part (file)
+ data = ''
+ f = File.open(Dir.pwd+"/source/"+file)
+ f.each_line do |line|
+ data += line
+ end
+ data
+ end
+
def shorten_words (string, word_limit = 25)
words = string.split(/\s/)
if words.size >= word_limit