rhelp 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rhelp +4 -0
- data/lib/rhelp.rb +23 -2
- metadata +5 -3
data/bin/rhelp
ADDED
data/lib/rhelp.rb
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
class RHelp
|
2
|
-
def self.
|
3
|
-
|
2
|
+
def self.run(filename)
|
3
|
+
if File.exists?(filename)
|
4
|
+
file = File.new(filename,"r")
|
5
|
+
lines = IO.readlines(file)
|
6
|
+
a = true
|
7
|
+
i = 0
|
8
|
+
while a
|
9
|
+
line = lines[i]
|
10
|
+
if line[0] == "#"
|
11
|
+
line = line[1..-1]
|
12
|
+
while line[0] == " "
|
13
|
+
line = line[1..-1]
|
14
|
+
end
|
15
|
+
puts line
|
16
|
+
else
|
17
|
+
a = false
|
18
|
+
end
|
19
|
+
i += 1
|
20
|
+
end
|
21
|
+
file.close
|
22
|
+
else
|
23
|
+
puts "File not found."
|
24
|
+
end
|
4
25
|
end
|
5
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhelp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,12 +11,14 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2013-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: A script to allow you to
|
14
|
+
description: A script to allow you to format a help display for in the console.
|
15
15
|
email: bradymkoehler@gmail.com
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- rhelp
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
21
|
+
- bin/rhelp
|
20
22
|
- lib/rhelp.rb
|
21
23
|
homepage: http://rubygems.org/gems/rhelp
|
22
24
|
licenses:
|