summaryrefslogtreecommitdiffhomepage
path: root/lib/yard/mruby/code_objects/function_object.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yard/mruby/code_objects/function_object.rb')
-rw-r--r--lib/yard/mruby/code_objects/function_object.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/yard/mruby/code_objects/function_object.rb b/lib/yard/mruby/code_objects/function_object.rb
index ecf7dd5..35b8e4f 100644
--- a/lib/yard/mruby/code_objects/function_object.rb
+++ b/lib/yard/mruby/code_objects/function_object.rb
@@ -22,6 +22,17 @@ module YARD::MRuby::CodeObjects
''
end
+ def return_type
+ obj.tag(:return).types.first
+ end
+
+ def return_type=(type)
+ return if type == 'void'
+ add_tag(YARD::Tags::Tag.new(:return,"", "")) unless has_tag?(:return)
+ tag(:return).types = [type]
+ end
+
+
# Returns all alias names of the object
# @return [Array<Symbol>] the alias names
def aliases