yard-turnip 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/README.md +4 -0
- data/lib/yard/turnip.rb +19 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTMwODE4ZDNkZmRhNjNiMzZiNjJkNzE2Y2U3OTE3YTI0NzQxZThlNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
ZGQxNzc2YmUwY2NjYjhhZGEyMmIyNzViMTQ0YTBiNzI3ODcxMTJmMQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmY0Nzg0M2U1ZjcyNWI0N2IzMzIyMjlmYzE4MTEyOTczZTVkZjAwOTVmZmI4
|
10
|
+
ODEyNzdmNDdhZmRlNGIwMmNmODFlNzhhYmQ1YjEzM2U1ZTVkMDBkYzYxMWQ0
|
11
|
+
MmMwZmQ2M2YxMjZjMDk5OTlkZWEzOWE1N2QzMGYxNGEwMDZjMTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTlhODhmNjUxZDEyZGRjMjk3YTkxYTdhMjBjNDRkMWZmMjRmMjVkYWExOTdi
|
14
|
+
Yjg2MTE3YTRjNGQ0NmM2YzcyYzQ4NDkzOGY5ZjZjMGQ2YTZjZDRlZDE5YTE3
|
15
|
+
NjEwYTk2YzRkM2VkOWY5ZTRiNDhhNzVmZDRhOTFlMDYxZTU5ODA=
|
data/README.md
CHANGED
data/lib/yard/turnip.rb
CHANGED
@@ -1,31 +1,40 @@
|
|
1
1
|
require 'yard'
|
2
2
|
module YARD
|
3
3
|
module Turnip
|
4
|
-
VERSION = "0.0.
|
4
|
+
VERSION = "0.0.2"
|
5
5
|
end
|
6
6
|
|
7
7
|
module CodeObjects
|
8
|
+
class StepsForObject < ModuleObject
|
9
|
+
def type
|
10
|
+
:module
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
8
14
|
class StepObject < MethodObject
|
9
15
|
def type
|
10
16
|
:method
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
14
|
-
|
20
|
+
|
21
|
+
class StepsForHandler < Handlers::Ruby::Base
|
22
|
+
handles method_call(:steps_for)
|
23
|
+
|
24
|
+
def process
|
25
|
+
name = statement.parameters.first.jump(:tstring_content, :ident).source
|
26
|
+
object = CodeObjects::StepsForObject.new(namespace, name)
|
27
|
+
register(object)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
15
31
|
class StepHandler < Handlers::Ruby::Base
|
16
32
|
handles method_call(:step)
|
17
33
|
|
18
34
|
def process
|
19
|
-
|
35
|
+
name = statement.parameters.first.jump(:tstring_content, :ident).source
|
20
36
|
object = CodeObjects::StepObject.new(namespace, name)
|
21
37
|
register(object)
|
22
|
-
parse_block(statement.last.last, :owner => object)
|
23
|
-
|
24
|
-
# modify the object
|
25
|
-
object.dynamic = true
|
26
|
-
|
27
|
-
# add custom metadata to the object
|
28
|
-
object['custom_field'] = 'Generated by Methodify'
|
29
38
|
end
|
30
39
|
end
|
31
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-turnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo TAKAISHI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.0.14
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: This plugin adds Turnip steps to YARD output.
|