Module: Fzeet::Toggle

Included in:
UIRibbon::Command, WindowMethods
Defined in:
lib/fzeet/windows/core/Common.rb

Instance Method Summary collapse

Instance Method Details

#toggle(what) ⇒ Object



128
129
130
131
132
133
134
135
136
137
138
# File 'lib/fzeet/windows/core/Common.rb', line 128

def toggle(what)
  send("#{what}=", !send("#{what}?"))

  begin
    yield self
  ensure
    toggle(what)
  end if block_given?

  self
end