docs: annotate Ruby configuration and plugin APIs with YARD types
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
Vamp.plugin "greeting", requires: ["text"]
|
||||
|
||||
# @param editor [Vamp::Editor]
|
||||
# @param args [String]
|
||||
Vamp.command "greet" do |editor, args|
|
||||
# @type [String]
|
||||
name = args.empty? ? "world" : args
|
||||
editor.insert "Hello, #{name}!\n"
|
||||
editor.message "Greeting inserted by Ruby"
|
||||
end
|
||||
|
||||
# @param editor [Vamp::Editor]
|
||||
# @param _args [String]
|
||||
Vamp.command "upper" do |editor, _args|
|
||||
editor.replace editor.text.upcase
|
||||
editor.message "Buffer uppercased by Ruby"
|
||||
|
||||
Reference in New Issue
Block a user