Class: Yoda::Store::Query::FindMethod

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/store/query/find_method.rb

Instance Attribute Summary

Attributes inherited from Base

#registry

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Yoda::Store::Query::Base

Instance Method Details

#all(namespace, visibility: nil) ⇒ Enumerator<Objects::MethodObject>

Parameters:

  • namespace (Objects::Namespace)
  • visibility (Array<Symbol>, nil) (defaults to: nil)

Returns:



24
25
26
# File 'lib/yoda/store/query/find_method.rb', line 24

def all(namespace, visibility: nil)
  lazy_select(namespace, //, visibility: visibility)
end

#find(namespace, method_name, visibility: nil) ⇒ Objects::MethodObject?

Parameters:

Returns:



9
10
11
# File 'lib/yoda/store/query/find_method.rb', line 9

def find(namespace, method_name, visibility: nil)
  lazy_select(namespace, method_name, visibility: visibility).first
end

#select(namespace, method_name, visibility: nil) ⇒ Array<Objects::MethodObject>

Parameters:

  • namespace (Objects::Namespace)
  • method_name (String, Regexp)
  • visibility (Array<Symbol>, nil) (defaults to: nil)

Returns:



17
18
19
# File 'lib/yoda/store/query/find_method.rb', line 17

def select(namespace, method_name, visibility: nil)
  lazy_select(namespace, method_name, visibility: visibility).to_a
end