Module: Livecode::Silenceable
- Defined in:
- lib/livecode/silenceable.rb
Overview
Silenceable lets you mute procs and blocks when used by Timer and Clock.
Instance Attribute Summary collapse
-
#silenced ⇒ Object
Returns the value of attribute silenced.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#silenced ⇒ Object
Returns the value of attribute silenced.
15 16 17 |
# File 'lib/livecode/silenceable.rb', line 15 def silenced @silenced end |
Class Method Details
.apply(obj) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/livecode/silenceable.rb', line 6 def apply(obj) unless obj.respond_to?(:silenced?) class << obj include Silenceable end end return obj end |
Instance Method Details
#silenced? ⇒ Boolean
17 |
# File 'lib/livecode/silenceable.rb', line 17 def silenced?; @silenced ? true : false; end |