lib/yoda/store/query/find_method.rb in yoda-language-server-0.7.2 vs lib/yoda/store/query/find_method.rb in yoda-language-server-0.8.0
- old
+ new
@@ -1,10 +1,10 @@
module Yoda
module Store
module Query
class FindMethod < Base
- # @param namespace [Objects::Namespace]
+ # @param namespace [Objects::NamespaceObject]
# @param method_name [String, Regexp]
# @param visibility [Array<Symbol>, nil]
# @return [Objects::MethodObject, nil]
def find(namespace, method_name, visibility: nil)
lazy_select(namespace, method_name, visibility: visibility).first
@@ -13,10 +13,17 @@
# @param namespace [Objects::Namespace]
# @param method_name [String, Regexp]
# @param visibility [Array<Symbol>, nil]
# @return [Array<Objects::MethodObject>]
def select(namespace, method_name, visibility: nil)
- lazy_select(namespace, method_name, visibility: nil).to_a
+ lazy_select(namespace, method_name, visibility: visibility).to_a
+ end
+
+ # @param namespace [Objects::Namespace]
+ # @param visibility [Array<Symbol>, nil]
+ # @return [Enumerator<Objects::MethodObject>]
+ def all(namespace, visibility: nil)
+ lazy_select(namespace, //, visibility: visibility)
end
private
# @param namespace [Objects::Namespace]