class Reline::KeyActor::Composite
Public Class Methods
Source
# File lib/reline/key_actor/composite.rb, line 2 def initialize(key_actors) @key_actors = key_actors end
Public Instance Methods
Source
# File lib/reline/key_actor/composite.rb, line 10
def get(key)
@key_actors.each do |key_actor|
func = key_actor.get(key)
return func if func
end
nil
end Source
# File lib/reline/key_actor/composite.rb, line 6
def matching?(key)
@key_actors.any? { |key_actor| key_actor.matching?(key) }
end
Ruby Core © 1993–2024 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.