documentize 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -20
- data/lib/documentize/builder.rb +1 -1
- data/lib/documentize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36c3ea291baa8735c7b8bc3eb5888fb8907c016f
|
4
|
+
data.tar.gz: 5b7c99220c8fd2d45dfa44066a72508fb78b117d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b4e5c4c8632b0ada05c9d49a1c620598ed84f30046d2aa0803e9ca58727750792257113613b511041720aae7cc9e2790e99234b16bc5fda98452fa7a702811d
|
7
|
+
data.tar.gz: 024add8f810c2977ecadf7e4a178f01f4f71510d65b3d11be874c8b9ef8d43041bfbb87ff34a2dc7d37e5cab42825673e66905c279d97571858d4e9a599eb852
|
data/README.md
CHANGED
@@ -1,41 +1,27 @@
|
|
1
1
|
# Documentize
|
2
2
|
|
3
|
-
|
3
|
+
generates a ruby file with a TomDoc skeletons from existing ruby files
|
4
4
|
|
5
|
-
|
5
|
+
Pass in a cluttered, or just undocumented ruby file and get back a well-spaced file with a TomDoc Skeleton for easy doc writing
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'documentize'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
9
|
+
run the following in your console:
|
20
10
|
|
21
11
|
$ gem install documentize
|
22
12
|
|
23
13
|
## Usage
|
24
14
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
15
|
+
Documentize takes any ruby file as an argument in the CLI, relative to you current working directory:
|
28
16
|
|
29
|
-
|
17
|
+
$ documentize my_ruby_file.rb
|
30
18
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
19
|
|
33
20
|
## Contributing
|
34
21
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
22
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/SampsonCrowley/documentize](https://github.com/SampsonCrowley/documentize)
|
36
23
|
|
37
24
|
|
38
25
|
## License
|
39
26
|
|
40
27
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
data/lib/documentize/builder.rb
CHANGED
@@ -35,7 +35,7 @@ module Documentize
|
|
35
35
|
str = ""
|
36
36
|
str << build_docs(code, indent) if code[:doc]
|
37
37
|
str << " "*indent
|
38
|
-
str << "#{code[:type]} #{code[:name]}"
|
38
|
+
str << "#{code[:type] == "method" ? "def" : code[:type]} #{code[:name]}"
|
39
39
|
str << build_args(code[:args]) if code[:args]
|
40
40
|
str << "\n\n"
|
41
41
|
|
data/lib/documentize/version.rb
CHANGED