Class: Shoes::ProxyArray
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Shoes::ProxyArray
- Defined in:
- shoes-core/lib/shoes/list_box.rb
Instance Attribute Summary collapse
-
#gui ⇒ Object
Returns the value of attribute gui.
Instance Method Summary collapse
-
#initialize(array, gui) ⇒ ProxyArray
constructor
A new instance of ProxyArray.
- #method_missing(method, *args, &block) ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(array, gui) ⇒ ProxyArray
Returns a new instance of ProxyArray.
7 8 9 10 |
# File 'shoes-core/lib/shoes/list_box.rb', line 7 def initialize(array, gui) @gui = gui super(array) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'shoes-core/lib/shoes/list_box.rb', line 12 def method_missing(method, *args, &block) res = super(method, *args, &block) gui.update_items case res when ProxyArray, Array self else res end end |
Instance Attribute Details
#gui ⇒ Object
Returns the value of attribute gui.
5 6 7 |
# File 'shoes-core/lib/shoes/list_box.rb', line 5 def gui @gui end |
Instance Method Details
#to_a ⇒ Object
24 25 26 |
# File 'shoes-core/lib/shoes/list_box.rb', line 24 def to_a __getobj__ end |