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.



237
238
239
# File 'lib/ruby_rich/app_shell.rb', line 237

def initialize(*targets)
  @targets = targets
end

Instance Method Details

#blurObject



245
246
247
# File 'lib/ruby_rich/app_shell.rb', line 245

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

#focusObject



241
242
243
# File 'lib/ruby_rich/app_shell.rb', line 241

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