lib/inch/language/nodejs/provider/jsdoc/object/base.rb in inch-0.5.0.rc8 vs lib/inch/language/nodejs/provider/jsdoc/object/base.rb in inch-0.5.0.rc9
- old
+ new
@@ -145,11 +145,18 @@
def overridden_method_fullname
nil # raise NotImplementedError
end
def parameters
- [] # raise NotImplementedError
+ if meta? && meta['code']
+ names = meta['code']['paramnames'] || []
+ names.map do |name|
+ FunctionParameterObject.new(self, name)
+ end
+ else
+ []
+ end
end
def private?
false
end
@@ -205,10 +212,10 @@
def undocumented?
@hash['comment'].to_s.empty?
end
def visibility
- :public
+ docstring.visibility
end
protected
def meta?