putsplus 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef64a809399c557f3cf2308357a1dd1caaa16568
4
- data.tar.gz: 9aff3188bba5b720f581eeb8392ad52b2fad2a93
3
+ metadata.gz: 4ff886c390af45994820bd5862f3f6642d7f4c09
4
+ data.tar.gz: 6f1faae6baeb1149fafbf30b5bbe8b0c3c06f3f7
5
5
  SHA512:
6
- metadata.gz: 5452e350269b3422a4f5971c10ba0f25d2d2333bbfabc1711a281977d9573e9ed4c109067d8779ba942e58b133973b3624b10acabbb10c37fddf6ae3d43d9d5d
7
- data.tar.gz: 06767a22b8ea9f738060d90700dc0f185727c7eec92ea9d47961031226543e60f4537e4ea8152a2e3f90b4ea231e473923e3b81d3e6ec72a63ec609481195e10
6
+ metadata.gz: ae1c43b7026bb9986b20b080d70c625578f3506743774333ca83e6059605dff34a7fedb9550319da4b033dd38b3da43c6cf827f21a080edcea387b5d513fa6b4
7
+ data.tar.gz: 2efa288b6f06c60ccdc9da6d436a2902f7cb87d6682b050058be96ca98c7154d5dc8eaf75815165b7e4c97938c2eb0010ccd9564d4315c9c52d97d258d941af3
@@ -1,3 +1,3 @@
1
1
  module Putsplus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/putsplus.rb CHANGED
@@ -1,16 +1,21 @@
1
1
  require "putsplus/version"
2
2
 
3
3
  module Putsplus
4
-
5
- # puts only if obj is not nil
4
+ #
5
+ #Puts only if obj is not null
6
6
  #
7
7
  # Arguments:
8
- # obj: the obj that will be puts if it isn't nil
9
- # prefix: obj to append to the puts if obj isn't nil
8
+ # obj: the obj that will be puts if it isn't null
9
+ # prefix: obj to append to the puts if obj isn't null
10
+ #
10
11
  def nputs obj, prefix = nil
11
12
  puts prefix.to_s + obj.to_s unless obj.nil?
12
13
  end
13
14
 
15
+
16
+ #
17
+ #Puts each parameter with a tab inbetween each
18
+ #
14
19
  def tputs *obj
15
20
  out = ""
16
21
  obj.each_with_index do |o, index|
@@ -21,6 +26,13 @@ module Putsplus
21
26
  puts out
22
27
  end
23
28
 
29
+ #
30
+ #Puts a line break with given character and length
31
+ #
32
+ #Arguments:
33
+ # num: number of times to repeat the given character. Default is 6.
34
+ # char: the character or string to repeat. Default is '-'
35
+ #
24
36
  def linebr num = 6, char = '-'
25
37
  raise Exeception, "num must be an Integer" unless is_int?(num)
26
38
  raise Exeception, "char must be an Character or String" unless (is_string? char)
@@ -28,8 +40,7 @@ module Putsplus
28
40
  puts char * num
29
41
  end
30
42
 
31
-
32
-
43
+ #PRIVATE VARS
33
44
  private
34
45
 
35
46
  def is_int? obj
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: putsplus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Jubelirer