diff options
Diffstat (limited to 'lib/yard/mruby/code_objects/function_object.rb')
| -rw-r--r-- | lib/yard/mruby/code_objects/function_object.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/yard/mruby/code_objects/function_object.rb b/lib/yard/mruby/code_objects/function_object.rb index 0a835b5..c726762 100644 --- a/lib/yard/mruby/code_objects/function_object.rb +++ b/lib/yard/mruby/code_objects/function_object.rb @@ -2,6 +2,14 @@ module YARD::MRuby::CodeObjects # A FunctionObject represents a MRuby C API function declaration inside a header inside an include directory class FunctionObject < YARD::CodeObjects::Base + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array<Array(String, String)>] a list of parameter names followed + # by their default values (or nil) + attr_accessor :parameters + def initialize(header, name, &block) super end @@ -14,6 +22,25 @@ module YARD::MRuby::CodeObjects def path self.name end + + def attr_info + nil + end + + def scope + '' + end + + # Returns all alias names of the object + # @return [Array<Symbol>] the alias names + def aliases + list = [] + return list unless namespace.is_a?(HeaderObject) + namespace.aliases.each do |o, aname| + list << o if aname == name && o.scope == scope + end + list + end end end |
