inch 0.5.0.rc5 → 0.5.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -6
- data/.rubocop_todo.yml +40 -34
- data/Gemfile +3 -3
- data/Rakefile +10 -6
- data/bin/inch +5 -5
- data/config/base.rb +4 -4
- data/config/nodejs.rb +44 -1
- data/config/ruby.rb +1 -1
- data/inch.gemspec +17 -17
- data/lib/inch.rb +13 -13
- data/lib/inch/api.rb +10 -10
- data/lib/inch/api/compare.rb +2 -2
- data/lib/inch/api/compare/code_objects.rb +1 -1
- data/lib/inch/api/diff.rb +1 -1
- data/lib/inch/api/options/suggest.rb +1 -1
- data/lib/inch/api/suggest.rb +1 -1
- data/lib/inch/cli.rb +6 -6
- data/lib/inch/cli/command.rb +15 -15
- data/lib/inch/cli/command/base.rb +5 -3
- data/lib/inch/cli/command/base_list.rb +0 -1
- data/lib/inch/cli/command/console.rb +5 -5
- data/lib/inch/cli/command/diff.rb +6 -6
- data/lib/inch/cli/command/inspect.rb +5 -5
- data/lib/inch/cli/command/list.rb +4 -4
- data/lib/inch/cli/command/options/base.rb +17 -15
- data/lib/inch/cli/command/options/base_list.rb +17 -17
- data/lib/inch/cli/command/options/base_object.rb +1 -1
- data/lib/inch/cli/command/options/console.rb +13 -13
- data/lib/inch/cli/command/options/diff.rb +19 -19
- data/lib/inch/cli/command/options/inspect.rb +5 -5
- data/lib/inch/cli/command/options/list.rb +7 -7
- data/lib/inch/cli/command/options/show.rb +5 -5
- data/lib/inch/cli/command/options/stats.rb +2 -2
- data/lib/inch/cli/command/options/suggest.rb +12 -12
- data/lib/inch/cli/command/output/base.rb +1 -1
- data/lib/inch/cli/command/output/diff.rb +9 -9
- data/lib/inch/cli/command/output/inspect.rb +13 -13
- data/lib/inch/cli/command/output/list.rb +1 -1
- data/lib/inch/cli/command/output/show.rb +4 -4
- data/lib/inch/cli/command/output/stats.rb +14 -14
- data/lib/inch/cli/command/output/suggest.rb +14 -14
- data/lib/inch/cli/command/show.rb +4 -4
- data/lib/inch/cli/command/stats.rb +4 -4
- data/lib/inch/cli/command/suggest.rb +4 -4
- data/lib/inch/cli/command_parser.rb +4 -4
- data/lib/inch/cli/sparkline_helper.rb +1 -1
- data/lib/inch/cli/trace_helper.rb +1 -1
- data/lib/inch/cli/yardopts_helper.rb +1 -1
- data/lib/inch/code_object.rb +3 -3
- data/lib/inch/code_object/provider.rb +3 -3
- data/lib/inch/code_object/proxy.rb +3 -4
- data/lib/inch/codebase.rb +5 -5
- data/lib/inch/codebase/object.rb +2 -1
- data/lib/inch/codebase/serializer.rb +2 -2
- data/lib/inch/config.rb +6 -6
- data/lib/inch/config/codebase.rb +5 -5
- data/lib/inch/core_ext.rb +1 -1
- data/lib/inch/core_ext/string.rb +1 -1
- data/lib/inch/evaluation.rb +8 -8
- data/lib/inch/evaluation/proxy.rb +2 -3
- data/lib/inch/evaluation/role.rb +1 -1
- data/lib/inch/language/elixir/code_object/base.rb +6 -4
- data/lib/inch/language/elixir/evaluation/base.rb +2 -1
- data/lib/inch/language/elixir/evaluation/function_object.rb +1 -1
- data/lib/inch/language/elixir/import.rb +14 -14
- data/lib/inch/language/elixir/provider/reader.rb +1 -1
- data/lib/inch/language/elixir/provider/reader/docstring.rb +13 -0
- data/lib/inch/language/elixir/provider/reader/object.rb +5 -5
- data/lib/inch/language/elixir/provider/reader/object/base.rb +13 -5
- data/lib/inch/language/elixir/provider/reader/object/function_object.rb +1 -1
- data/lib/inch/language/elixir/provider/reader/parser.rb +21 -7
- data/lib/inch/language/elixir/roles/base.rb +3 -3
- data/lib/inch/language/elixir/roles/function.rb +2 -1
- data/lib/inch/language/elixir/roles/object.rb +1 -1
- data/lib/inch/language/nodejs/code_object/base.rb +199 -0
- data/lib/inch/language/nodejs/code_object/function_object.rb +74 -0
- data/lib/inch/language/nodejs/code_object/member_object.rb +11 -0
- data/lib/inch/language/nodejs/code_object/module_object.rb +23 -0
- data/lib/inch/language/nodejs/evaluation/base.rb +29 -0
- data/lib/inch/language/nodejs/evaluation/function_object.rb +31 -0
- data/lib/inch/language/nodejs/evaluation/member_object.rb +11 -0
- data/lib/inch/language/nodejs/evaluation/module_object.rb +27 -0
- data/lib/inch/language/nodejs/import.rb +17 -1
- data/lib/inch/language/nodejs/provider/jsdoc.rb +1 -1
- data/lib/inch/language/nodejs/provider/jsdoc/docstring.rb +13 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object.rb +16 -8
- data/lib/inch/language/nodejs/provider/jsdoc/object/base.rb +82 -45
- data/lib/inch/language/nodejs/provider/jsdoc/object/function_object.rb +18 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object/member_object.rb +15 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object/module_object.rb +22 -0
- data/lib/inch/language/nodejs/provider/jsdoc/parser.rb +9 -10
- data/lib/inch/language/nodejs/roles/base.rb +32 -0
- data/lib/inch/language/nodejs/roles/function.rb +113 -0
- data/lib/inch/language/nodejs/roles/member.rb +13 -0
- data/lib/inch/language/nodejs/roles/module.rb +64 -0
- data/lib/inch/language/nodejs/roles/object.rb +76 -0
- data/lib/inch/language/ruby/code_object/base.rb +6 -4
- data/lib/inch/language/ruby/evaluation/base.rb +2 -1
- data/lib/inch/language/ruby/evaluation/method_object.rb +2 -1
- data/lib/inch/language/ruby/import.rb +24 -24
- data/lib/inch/language/ruby/provider/yard.rb +10 -10
- data/lib/inch/language/ruby/provider/yard/nodoc_helper.rb +2 -2
- data/lib/inch/language/ruby/provider/yard/object.rb +9 -9
- data/lib/inch/language/ruby/provider/yard/object/base.rb +25 -28
- data/lib/inch/language/ruby/provider/yard/object/method_object.rb +4 -3
- data/lib/inch/language/ruby/provider/yard/object/method_parameter_object.rb +4 -3
- data/lib/inch/language/ruby/provider/yard/object/method_signature.rb +2 -2
- data/lib/inch/language/ruby/provider/yard/object/namespace_object.rb +2 -1
- data/lib/inch/language/ruby/provider/yard/parser.rb +2 -2
- data/lib/inch/language/ruby/roles/base.rb +1 -1
- data/lib/inch/language/ruby/roles/method.rb +2 -1
- data/lib/inch/language/ruby/roles/method_parameter.rb +1 -1
- data/lib/inch/language/ruby/roles/missing.rb +2 -2
- data/lib/inch/language/ruby/roles/object.rb +6 -6
- data/lib/inch/rake.rb +2 -2
- data/lib/inch/rake/suggest.rb +5 -5
- data/lib/inch/utils/code_location.rb +12 -0
- data/lib/inch/utils/read_write_methods.rb +2 -2
- data/lib/inch/utils/ui.rb +8 -8
- data/lib/inch/version.rb +1 -1
- data/test/fixtures/elixir/simple/all.json +321 -0
- data/test/integration/api/compare/codebases.rb +6 -6
- data/test/integration/cli/command/console_test.rb +13 -13
- data/test/integration/cli/command/diff_test.rb +12 -14
- data/test/integration/cli/command/inspect_test.rb +30 -30
- data/test/integration/cli/command/list_test.rb +34 -34
- data/test/integration/cli/command/show_test.rb +26 -26
- data/test/integration/cli/command/stats_test.rb +23 -23
- data/test/integration/cli/command/suggest_test.rb +58 -49
- data/test/integration/stats_options_test.rb +9 -9
- data/test/integration/visibility_options_test.rb +49 -45
- data/test/shared/base_list.rb +41 -41
- data/test/test_helper.rb +18 -10
- data/test/unit/api/filter_test.rb +9 -9
- data/test/unit/api/get_test.rb +6 -6
- data/test/unit/api/list_test.rb +3 -3
- data/test/unit/api/options/base_test.rb +6 -6
- data/test/unit/api/stats_test.rb +3 -3
- data/test/unit/api/suggest_test.rb +4 -4
- data/test/unit/cli/arguments_test.rb +25 -25
- data/test/unit/cli/command/base_test.rb +3 -3
- data/test/unit/cli/command/options/base_list_test.rb +14 -14
- data/test/unit/cli/command/options/base_object_test.rb +6 -6
- data/test/unit/cli/command/options/base_test.rb +3 -3
- data/test/unit/cli/command_parser_test.rb +29 -29
- data/test/unit/cli/trace_helper_test.rb +2 -2
- data/test/unit/cli/yardopts_helper_test.rb +35 -35
- data/test/unit/code_object/converter_test.rb +3 -3
- data/test/unit/code_object/provider_test.rb +2 -2
- data/test/unit/code_object/proxy_test.rb +11 -11
- data/test/unit/codebase/objects_test.rb +8 -8
- data/test/unit/codebase/proxy_test.rb +5 -5
- data/test/unit/config/codebase_test.rb +3 -3
- data/test/unit/config_test.rb +4 -4
- data/test/unit/evaluation/role_test.rb +8 -8
- data/test/unit/language/elixir/code_object/function_object_test.rb +35 -0
- data/test/unit/language/ruby/code_object/method_object_test.rb +128 -126
- data/test/unit/language/ruby/provider/yard/docstring_test.rb +27 -23
- data/test/unit/language/ruby/provider/yard/nodoc_helper_test.rb +21 -20
- data/test/unit/language/ruby/provider/yard/object/method_object_test.rb +20 -17
- data/test/unit/language/ruby/provider/yard_test.rb +4 -4
- data/test/unit/utils/buffered_ui_test.rb +20 -20
- data/test/unit/utils/ui_test.rb +20 -20
- data/test/unit/utils/weighted_list_test.rb +7 -7
- metadata +25 -2
@@ -0,0 +1,23 @@
|
|
1
|
+
module Inch
|
2
|
+
module Language
|
3
|
+
module Nodejs
|
4
|
+
module CodeObject
|
5
|
+
# Proxy class for modules
|
6
|
+
class ModuleObject < Base
|
7
|
+
MANY_CHILDREN_THRESHOLD = 20
|
8
|
+
def has_many_children?
|
9
|
+
children.size > MANY_CHILDREN_THRESHOLD
|
10
|
+
end
|
11
|
+
|
12
|
+
def has_methods?
|
13
|
+
children.any?(&:method?)
|
14
|
+
end
|
15
|
+
|
16
|
+
def pure_namespace?
|
17
|
+
children.all?(&:namespace?)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Inch
|
2
|
+
module Language
|
3
|
+
module Nodejs
|
4
|
+
module Evaluation
|
5
|
+
# Base class for all Nodejs related evaluations
|
6
|
+
#
|
7
|
+
# @abstract
|
8
|
+
class Base < Inch::Evaluation::Proxy
|
9
|
+
protected
|
10
|
+
|
11
|
+
def relevant_base_roles
|
12
|
+
{
|
13
|
+
Role::Object::InRoot => nil,
|
14
|
+
Role::Object::Public => nil,
|
15
|
+
Role::Object::TaggedAsNodoc => nil,
|
16
|
+
Role::Object::WithDoc => score_for(:docstring),
|
17
|
+
Role::Object::WithoutDoc => score_for(:docstring),
|
18
|
+
Role::Object::WithCodeExample => score_for(:code_example_single),
|
19
|
+
Role::Object::WithMultipleCodeExamples =>
|
20
|
+
score_for(:code_example_multi),
|
21
|
+
Role::Object::WithoutCodeExample =>
|
22
|
+
score_for(:code_example_single)
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Inch
|
2
|
+
module Language
|
3
|
+
module Nodejs
|
4
|
+
module Evaluation
|
5
|
+
# Proxy class for functions
|
6
|
+
class FunctionObject < Base
|
7
|
+
protected
|
8
|
+
|
9
|
+
def relevant_roles
|
10
|
+
relevant_base_roles.merge(relevant_function_roles)
|
11
|
+
end
|
12
|
+
|
13
|
+
def relevant_function_roles
|
14
|
+
{
|
15
|
+
Role::Function::Getter => nil,
|
16
|
+
Role::Function::Setter => nil,
|
17
|
+
Role::Function::Overridden =>
|
18
|
+
if object.overridden?
|
19
|
+
object.overridden_method.score
|
20
|
+
else
|
21
|
+
nil
|
22
|
+
end,
|
23
|
+
Role::Function::WithBangName => nil,
|
24
|
+
Role::Function::WithQuestioningName => nil
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Inch
|
2
|
+
module Language
|
3
|
+
module Nodejs
|
4
|
+
module Evaluation
|
5
|
+
# Proxy class for modules
|
6
|
+
class ModuleObject < Base
|
7
|
+
protected
|
8
|
+
|
9
|
+
def relevant_roles
|
10
|
+
relevant_base_roles.merge(relevant_namespace_roles)
|
11
|
+
end
|
12
|
+
|
13
|
+
# @see Evaluation::Ruby::Base
|
14
|
+
def relevant_namespace_roles
|
15
|
+
{
|
16
|
+
Role::Module::WithoutChildren => nil,
|
17
|
+
Role::Module::WithChildren => nil,
|
18
|
+
Role::Module::WithManyChildren => nil,
|
19
|
+
Role::Module::WithoutMethods => nil,
|
20
|
+
Role::Module::Pure => nil
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -5,4 +5,20 @@ module Inch
|
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
8
|
-
require
|
8
|
+
require 'inch/language/nodejs/provider/jsdoc'
|
9
|
+
|
10
|
+
require 'inch/language/nodejs/code_object/base'
|
11
|
+
require 'inch/language/nodejs/code_object/module_object'
|
12
|
+
require 'inch/language/nodejs/code_object/function_object'
|
13
|
+
require 'inch/language/nodejs/code_object/member_object'
|
14
|
+
|
15
|
+
require 'inch/language/nodejs/evaluation/base'
|
16
|
+
require 'inch/language/nodejs/evaluation/module_object'
|
17
|
+
require 'inch/language/nodejs/evaluation/function_object'
|
18
|
+
require 'inch/language/nodejs/evaluation/member_object'
|
19
|
+
|
20
|
+
require 'inch/language/nodejs/roles/base'
|
21
|
+
require 'inch/language/nodejs/roles/object'
|
22
|
+
require 'inch/language/nodejs/roles/module'
|
23
|
+
require 'inch/language/nodejs/roles/function'
|
24
|
+
require 'inch/language/nodejs/roles/member'
|
@@ -1,3 +1,8 @@
|
|
1
|
+
require 'inch/language/nodejs/provider/jsdoc/object/base'
|
2
|
+
require 'inch/language/nodejs/provider/jsdoc/object/function_object'
|
3
|
+
require 'inch/language/nodejs/provider/jsdoc/object/module_object'
|
4
|
+
require 'inch/language/nodejs/provider/jsdoc/object/member_object'
|
5
|
+
|
1
6
|
module Inch
|
2
7
|
module Language
|
3
8
|
module Nodejs
|
@@ -17,7 +22,7 @@ module Inch
|
|
17
22
|
# @return [Provider::JSDoc::Object]
|
18
23
|
def for(jsdoc_object)
|
19
24
|
@cache ||= {}
|
20
|
-
if proxy_object = @cache[cache_key(jsdoc_object)]
|
25
|
+
if (proxy_object = @cache[cache_key(jsdoc_object)])
|
21
26
|
proxy_object
|
22
27
|
else
|
23
28
|
@cache[cache_key(jsdoc_object)] =
|
@@ -27,15 +32,15 @@ module Inch
|
|
27
32
|
|
28
33
|
private
|
29
34
|
|
30
|
-
# Returns a Proxy class for the given +
|
35
|
+
# Returns a Proxy class for the given +json_object+
|
31
36
|
#
|
32
|
-
# @param
|
37
|
+
# @param json_object [Hash]
|
33
38
|
# @return [Class]
|
34
|
-
def class_for(
|
35
|
-
class_name =
|
36
|
-
const_get(class_name)
|
39
|
+
def class_for(json_object)
|
40
|
+
class_name = json_object['kind'].capitalize + 'Object'
|
41
|
+
JSDoc::Object.const_get(class_name)
|
37
42
|
rescue NameError
|
38
|
-
Base
|
43
|
+
JSDoc::Object::Base
|
39
44
|
end
|
40
45
|
|
41
46
|
# Returns a cache key for the given +jsdoc_object+
|
@@ -44,7 +49,10 @@ module Inch
|
|
44
49
|
# @return [String]
|
45
50
|
def cache_key(jsdoc_object)
|
46
51
|
return if jsdoc_object['meta'].nil?
|
47
|
-
"#{jsdoc_object['
|
52
|
+
"#{jsdoc_object['longname']}/" \
|
53
|
+
"#{jsdoc_object['meta']['path']}/" \
|
54
|
+
"#{jsdoc_object['meta']['filename']}:" \
|
55
|
+
"#{jsdoc_object['meta']['lineno']}"
|
48
56
|
end
|
49
57
|
end
|
50
58
|
end
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'inch/language/nodejs/provider/jsdoc/docstring'
|
2
|
+
require 'inch/utils/code_location'
|
3
|
+
|
1
4
|
module Inch
|
2
5
|
module Language
|
3
6
|
module Nodejs
|
@@ -6,181 +9,215 @@ module Inch
|
|
6
9
|
module Object
|
7
10
|
# @abstract
|
8
11
|
class Base
|
12
|
+
# @return [String] the codebase's directory
|
13
|
+
attr_accessor :base_dir
|
14
|
+
|
9
15
|
# @param hash [Hash] hash returned via JSON interface
|
10
16
|
def initialize(hash)
|
11
17
|
@hash = hash
|
12
18
|
end
|
13
19
|
|
14
20
|
def name
|
15
|
-
|
21
|
+
@hash['name']
|
16
22
|
end
|
17
23
|
|
18
24
|
def fullname
|
19
|
-
|
20
|
-
|
21
|
-
|
25
|
+
#fail NotImplementedError
|
26
|
+
base = "#{@hash['longname']}"
|
27
|
+
if meta?
|
28
|
+
base << " @ #{meta['path']}/" \
|
29
|
+
"#{meta['filename']}:" \
|
30
|
+
"#{meta['lineno']}"
|
31
|
+
end
|
32
|
+
base
|
33
|
+
end
|
34
|
+
|
35
|
+
# Returns all files declaring the object in the form of an Array
|
36
|
+
# of Arrays containing the location of their declaration.
|
37
|
+
#
|
38
|
+
# @return [Array<CodeLocation>]
|
22
39
|
def files
|
23
|
-
|
40
|
+
return [] unless meta?
|
41
|
+
filename = meta['path'] + '/' + meta['filename']
|
42
|
+
[
|
43
|
+
Inch::Utils::CodeLocation.new('', filename, meta['lineno'])
|
44
|
+
]
|
24
45
|
end
|
25
46
|
|
26
47
|
def filename
|
27
|
-
|
48
|
+
files.first.filename unless files.empty?
|
28
49
|
end
|
29
50
|
|
51
|
+
attr_writer :children_fullnames
|
30
52
|
def children_fullnames
|
31
|
-
|
53
|
+
@children_fullnames ||= []
|
32
54
|
end
|
33
55
|
|
34
56
|
def parent_fullname
|
35
|
-
|
57
|
+
if depth == 1
|
58
|
+
nil
|
59
|
+
else
|
60
|
+
fullname.split('.')[0...-1].join('.')
|
61
|
+
end
|
36
62
|
end
|
37
63
|
|
38
64
|
def api_tag?
|
39
|
-
|
65
|
+
nil
|
40
66
|
end
|
41
67
|
|
42
68
|
def aliased_object_fullname
|
43
|
-
|
69
|
+
nil
|
44
70
|
end
|
45
71
|
|
46
72
|
def aliases_fullnames
|
47
|
-
|
73
|
+
nil
|
48
74
|
end
|
49
75
|
|
50
76
|
def attributes
|
51
|
-
|
77
|
+
[]
|
52
78
|
end
|
53
79
|
|
54
80
|
def bang_name?
|
55
|
-
|
81
|
+
false
|
56
82
|
end
|
57
83
|
|
58
84
|
def constant?
|
59
|
-
raise NotImplementedError
|
85
|
+
false # raise NotImplementedError
|
60
86
|
end
|
61
87
|
|
62
88
|
def constructor?
|
63
|
-
|
89
|
+
false
|
64
90
|
end
|
65
91
|
|
66
92
|
def depth
|
67
|
-
|
93
|
+
fullname.split('.').size
|
68
94
|
end
|
69
95
|
|
96
|
+
# @return [Docstring]
|
70
97
|
def docstring
|
71
|
-
|
98
|
+
@docstring ||= Docstring.new(@hash['comment'])
|
72
99
|
end
|
73
100
|
|
74
101
|
def getter?
|
75
|
-
raise NotImplementedError
|
102
|
+
name =~ /^get_/ # raise NotImplementedError
|
76
103
|
end
|
77
104
|
|
78
105
|
def has_children?
|
79
|
-
|
106
|
+
!children_fullnames.empty?
|
80
107
|
end
|
81
108
|
|
82
109
|
def has_code_example?
|
83
|
-
raise NotImplementedError
|
110
|
+
false # raise NotImplementedError
|
84
111
|
end
|
85
112
|
|
86
113
|
def has_doc?
|
87
|
-
|
114
|
+
!undocumented?
|
88
115
|
end
|
89
116
|
|
90
117
|
def has_multiple_code_examples?
|
91
|
-
raise NotImplementedError
|
118
|
+
false # raise NotImplementedError
|
92
119
|
end
|
93
120
|
|
94
121
|
def has_unconsidered_tags?
|
95
|
-
raise NotImplementedError
|
122
|
+
false # raise NotImplementedError
|
96
123
|
end
|
97
124
|
|
98
125
|
def method?
|
99
|
-
|
126
|
+
false
|
100
127
|
end
|
101
128
|
|
102
129
|
def nodoc?
|
103
|
-
|
130
|
+
@hash['comment'] == false
|
104
131
|
end
|
105
132
|
|
106
133
|
def namespace?
|
107
|
-
|
134
|
+
false
|
108
135
|
end
|
109
136
|
|
110
137
|
def original_docstring
|
111
|
-
|
138
|
+
@hash['comment']
|
112
139
|
end
|
113
140
|
|
114
141
|
def overridden?
|
115
|
-
raise NotImplementedError
|
142
|
+
false # raise NotImplementedError
|
116
143
|
end
|
117
144
|
|
118
145
|
def overridden_method_fullname
|
119
|
-
raise NotImplementedError
|
146
|
+
nil # raise NotImplementedError
|
120
147
|
end
|
121
148
|
|
122
149
|
def parameters
|
123
|
-
raise NotImplementedError
|
150
|
+
[] # raise NotImplementedError
|
124
151
|
end
|
125
152
|
|
126
153
|
def private?
|
127
|
-
|
154
|
+
false
|
128
155
|
end
|
129
156
|
|
130
157
|
def tagged_as_internal_api?
|
131
|
-
|
158
|
+
false
|
132
159
|
end
|
133
160
|
|
134
161
|
def tagged_as_private?
|
135
|
-
|
162
|
+
nodoc?
|
136
163
|
end
|
137
164
|
|
138
165
|
def protected?
|
139
|
-
|
166
|
+
false
|
140
167
|
end
|
141
168
|
|
142
169
|
def public?
|
143
|
-
|
170
|
+
true
|
144
171
|
end
|
145
172
|
|
146
173
|
def questioning_name?
|
147
|
-
|
174
|
+
fullname =~ /\?$/
|
148
175
|
end
|
149
176
|
|
150
177
|
def return_described?
|
151
|
-
raise NotImplementedError
|
178
|
+
false # raise NotImplementedError
|
152
179
|
end
|
153
180
|
|
154
181
|
def return_mentioned?
|
155
|
-
raise NotImplementedError
|
182
|
+
false # raise NotImplementedError
|
156
183
|
end
|
157
184
|
|
158
185
|
def return_typed?
|
159
|
-
raise NotImplementedError
|
186
|
+
false # raise NotImplementedError
|
160
187
|
end
|
161
188
|
|
162
189
|
def in_root?
|
163
|
-
|
190
|
+
depth == 1
|
164
191
|
end
|
165
192
|
|
166
193
|
def setter?
|
167
|
-
raise NotImplementedError
|
194
|
+
name =~ /^set_/ # raise NotImplementedError
|
168
195
|
end
|
169
196
|
|
170
197
|
def source
|
171
|
-
|
198
|
+
nil
|
172
199
|
end
|
173
200
|
|
174
201
|
def unconsidered_tag_count
|
175
|
-
|
202
|
+
0
|
176
203
|
end
|
177
204
|
|
178
205
|
def undocumented?
|
179
|
-
|
206
|
+
@hash['comment'].to_s.empty?
|
180
207
|
end
|
181
208
|
|
182
209
|
def visibility
|
183
|
-
|
210
|
+
:public
|
211
|
+
end
|
212
|
+
|
213
|
+
protected
|
214
|
+
|
215
|
+
def meta?
|
216
|
+
!meta.nil?
|
217
|
+
end
|
218
|
+
|
219
|
+
def meta
|
220
|
+
@hash['meta']
|
184
221
|
end
|
185
222
|
end
|
186
223
|
end
|