Class: Shoes::Mask
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#real ⇒ Object
Returns the value of attribute real.
Instance Method Summary collapse
- #clear(&blk) ⇒ Object
-
#initialize(app, &blk) ⇒ Mask
constructor
A new instance of Mask.
- #mask_block_call(&blk) ⇒ Object
Constructor Details
#initialize(app, &blk) ⇒ Mask
Returns a new instance of Mask.
3 4 5 6 7 8 9 |
# File 'lib/shoes/mask.rb', line 3 def initialize app, &blk @app = app @parent = app.cslot @real = nil app.cslot.masked = true mask_block_call &blk end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
12 13 14 |
# File 'lib/shoes/mask.rb', line 12 def contents @contents end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
11 12 13 |
# File 'lib/shoes/mask.rb', line 11 def parent @parent end |
#real ⇒ Object
Returns the value of attribute real.
12 13 14 |
# File 'lib/shoes/mask.rb', line 12 def real @real end |
Instance Method Details
#clear(&blk) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/shoes/mask.rb', line 14 def clear &blk @real.clear @contents.each &:clear mask_block_call &blk Shoes.call_back_procs @app end |
#mask_block_call(&blk) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/shoes/mask.rb', line 21 def mask_block_call &blk @contents = [] @app.cmask = self blk.call if blk @app.cmask = nil @contents.each &:hide end |