Class: RubyRich::AppShell::FocusTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_rich/app_shell.rb

Instance Method Summary collapse

Constructor Details

#initialize(*targets) ⇒ FocusTarget

Returns a new instance of FocusTarget.



231
232
233
# File 'lib/ruby_rich/app_shell.rb', line 231

def initialize(*targets)
  @targets = targets
end

Instance Method Details

#blurObject



239
240
241
# File 'lib/ruby_rich/app_shell.rb', line 239

def blur
  @targets.each { |target| target.blur if target.respond_to?(:blur) }
end

#focusObject



235
236
237
# File 'lib/ruby_rich/app_shell.rb', line 235

def focus
  @targets.each { |target| target.focus if target.respond_to?(:focus) }
end