Class: RubyRich::AppShell::FocusTarget
- Inherits:
-
Object
- Object
- RubyRich::AppShell::FocusTarget
- Defined in:
- lib/ruby_rich/app_shell.rb
Instance Method Summary collapse
- #blur ⇒ Object
- #focus ⇒ Object
-
#initialize(*targets) ⇒ FocusTarget
constructor
A new instance of FocusTarget.
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
#blur ⇒ Object
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 |
#focus ⇒ Object
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 |